Add test for DI constructability of EditProfileFieldPage
[Sone.git] / src / test / kotlin / net / pterodactylus / sone / web / pages / EditProfileFieldPageTest.kt
index b4acc7e..81d10c0 100644 (file)
@@ -1,10 +1,13 @@
 package net.pterodactylus.sone.web.pages
 
 import net.pterodactylus.sone.data.Profile
+import net.pterodactylus.sone.test.getInstance
 import net.pterodactylus.sone.test.whenever
+import net.pterodactylus.sone.web.baseInjector
 import net.pterodactylus.util.web.Method.POST
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
+import org.hamcrest.Matchers.notNullValue
 import org.junit.Before
 import org.junit.Test
 import org.mockito.Mockito.never
@@ -93,4 +96,9 @@ class EditProfileFieldPageTest: WebPageTest(::EditProfileFieldPage) {
                assertThat(templateContext["duplicateFieldName"], equalTo<Any>(true))
        }
 
+       @Test
+       fun `page can be created by dependency injection`() {
+               assertThat(baseInjector.getInstance<EditProfileFieldPage>(), notNullValue())
+       }
+
 }