Convert index page test to use new web page test base
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 19 Jun 2017 09:08:14 +0000 (11:08 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 19 Jun 2017 09:08:14 +0000 (11:08 +0200)
src/test/kotlin/net/pterodactylus/sone/web/pages/IndexPageTest.kt

index d544912..ead3cbb 100644 (file)
@@ -19,10 +19,11 @@ import org.mockito.ArgumentMatchers
 /**
  * Unit test for [IndexPage].
  */
-class IndexPageTest : WebPageTest() {
+class IndexPageTest: WebPageTest2({ template, webInterface -> IndexPage(template, webInterface, postVisibilityFilter) }) {
 
-       private val postVisibilityFilter = mock<PostVisibilityFilter>()
-       private val page = IndexPage(template, webInterface, postVisibilityFilter)
+       companion object {
+               private val postVisibilityFilter = mock<PostVisibilityFilter>()
+       }
 
        @Test
        fun `page returns correct path`() {