From: David ‘Bombe’ Roden Date: Tue, 20 Jun 2017 12:36:21 +0000 (+0200) Subject: Convert bookmark page test to use new web page test base X-Git-Tag: 0.9.7^2~115 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=5183d56876024c2bfc635bb801d50d6c357e5e3c;p=Sone.git Convert bookmark page test to use new web page test base --- diff --git a/src/test/kotlin/net/pterodactylus/sone/web/pages/BookmarkPageTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/pages/BookmarkPageTest.kt index 0fe428e..c03706b 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/pages/BookmarkPageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/pages/BookmarkPageTest.kt @@ -13,10 +13,7 @@ import org.mockito.Mockito.verify /** * Unit test for [BookmarkPage]. */ -class BookmarkPageTest : WebPageTest() { - - private val page = BookmarkPage(template, webInterface) - override fun getPage() = page +class BookmarkPageTest: WebPageTest2(::BookmarkPage) { @Test fun `path is set correctly`() { @@ -25,8 +22,9 @@ class BookmarkPageTest : WebPageTest() { @Test fun `get request does not bookmark anything and does not redirect`() { - page.processTemplate(freenetRequest, templateContext) - verify(core, never()).bookmarkPost(any()) + verifyNoRedirect { + verify(core, never()).bookmarkPost(any()) + } } private fun setupBookmarkRequest() {