X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FViewSonePageTest.kt;h=22cba9f9a8bdae7284bfb0bbc627304c60777c44;hp=ea1f52823a8c86bd382b5dba20facebed683f7e0;hb=369ba7692f167e5b7f9a27898a06a5d7920904ed;hpb=03c29a3838e23ed0b9731ca4d84cf58038c30dfe diff --git a/src/test/kotlin/net/pterodactylus/sone/web/pages/ViewSonePageTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/pages/ViewSonePageTest.kt index ea1f528..22cba9f 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/pages/ViewSonePageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/pages/ViewSonePageTest.kt @@ -18,6 +18,7 @@ import org.hamcrest.Matchers.notNullValue import org.hamcrest.Matchers.nullValue import org.junit.Before import org.junit.Test +import java.net.* /** * Unit test for [ViewSonePage]. @@ -40,7 +41,7 @@ class ViewSonePageTest: WebPageTest(::ViewSonePage) { fun setup() { whenever(currentSone.posts).thenReturn(mutableListOf(post2, post1)) whenever(core.getDirectedPosts("sone-id")).thenReturn(setOf(directed1, directed2)) - core.preferences.postsPerPage = 2 + core.preferences.newPostsPerPage = 2 } @Test @@ -204,7 +205,7 @@ class ViewSonePageTest: WebPageTest(::ViewSonePage) { @Test fun `page is link-excepted`() { - assertThat(page.isLinkExcepted(null), equalTo(true)) + assertThat(page.isLinkExcepted(URI("")), equalTo(true)) } @Test