From: David ‘Bombe’ Roden Date: Mon, 19 Jun 2017 08:27:45 +0000 (+0200) Subject: Reformatting X-Git-Tag: 0.9.7^2~149 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=622f4687fc3a1fd7bdaf197e4288bba4383e6284;p=Sone.git Reformatting --- diff --git a/src/test/kotlin/net/pterodactylus/sone/web/pages/SearchPageTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/pages/SearchPageTest.kt index 7fab8d6..c93ac0c 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/pages/SearchPageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/pages/SearchPageTest.kt @@ -30,17 +30,17 @@ class SearchPageTest: WebPageTest2({ template, webInterface -> SearchPage(templa @Test fun `page returns correct path`() { - assertThat(page.path, equalTo("search.html")) + assertThat(page.path, equalTo("search.html")) } @Test fun `page does not require login`() { - assertThat(page.requiresLogin(), equalTo(false)) + assertThat(page.requiresLogin(), equalTo(false)) } @Test fun `page returns correct title`() { - addTranslation("Page.Search.Title", "search page title") + addTranslation("Page.Search.Title", "search page title") assertThat(page.getPageTitle(freenetRequest), equalTo("search page title")) } @@ -333,7 +333,7 @@ class SearchPageTest: WebPageTest2({ template, webInterface -> SearchPage(templa val post = createPost("with-match", "text") val callCounter = AtomicInteger() whenever(post.text).thenAnswer { callCounter.incrementAndGet(); "text" } - val sone = createSoneWithPost(post) + val sone = createSoneWithPost(post) addSone("sone", sone) addHttpRequestParameter("query", "text") verifyNoRedirect { @@ -349,13 +349,13 @@ class SearchPageTest: WebPageTest2({ template, webInterface -> SearchPage(templa val post = createPost("with-match", "text") val callCounter = AtomicInteger() whenever(post.text).thenAnswer { callCounter.incrementAndGet(); "text" } - val sone = createSoneWithPost(post) + val sone = createSoneWithPost(post) addSone("sone", sone) addHttpRequestParameter("query", "text") verifyNoRedirect { assertThat(this["postHits"], contains(post)) } - whenever(ticker.read()).thenReturn(TimeUnit.MINUTES.toNanos(5) + 1 ) + whenever(ticker.read()).thenReturn(TimeUnit.MINUTES.toNanos(5) + 1) verifyNoRedirect { assertThat(callCounter.get(), equalTo(2)) }