Add test for DI constructability of UntrustAjaxPage
[Sone.git] / src / test / kotlin / net / pterodactylus / sone / web / ajax / UntrustAjaxPageTest.kt
index f2de48d..6421c09 100644 (file)
@@ -1,9 +1,12 @@
 package net.pterodactylus.sone.web.ajax
 
 import net.pterodactylus.sone.data.Sone
+import net.pterodactylus.sone.test.getInstance
 import net.pterodactylus.sone.test.mock
+import net.pterodactylus.sone.web.baseInjector
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
+import org.hamcrest.Matchers.notNullValue
 import org.hamcrest.Matchers.nullValue
 import org.junit.Test
 import org.mockito.Mockito.verify
@@ -42,4 +45,9 @@ class UntrustAjaxPageTest : JsonPageTest("untrustSone.ajax", pageSupplier = ::Un
                assertThat(json["trustValue"], nullValue())
        }
 
+       @Test
+       fun `page can be created by dependency injection`() {
+           assertThat(baseInjector.getInstance<UntrustAjaxPage>(), notNullValue())
+       }
+
 }