X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FSearchPageTest.kt;h=2da2b24925ce98cc5a39658de3f872a92d50cb78;hp=104006c39ce356fea36726a959e541fd1a6c26a6;hb=03c29a3838e23ed0b9731ca4d84cf58038c30dfe;hpb=f006d66e2b479a97fe476c1eb9cad5b6421f60aa 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 104006c..2da2b24 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/pages/SearchPageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/pages/SearchPageTest.kt @@ -66,28 +66,28 @@ class SearchPageTest: WebPageTest({ template, webInterface -> SearchPage(templat @Test fun `searching for sone link redirects to view sone page`() { - addSone("sone-id", mock()) - addHttpRequestParameter("query", "sone://sone-id") - verifyRedirect("viewSone.html?sone=sone-id") + addSone("Sone-ID", mock()) + addHttpRequestParameter("query", "sone://Sone-ID") + verifyRedirect("viewSone.html?sone=Sone-ID") } @Test fun `searching for sone link without prefix redirects to view sone page`() { - addSone("sone-id", mock()) + addSone("sone-id", mock()) addHttpRequestParameter("query", "sone-id") verifyRedirect("viewSone.html?sone=sone-id") } @Test fun `searching for a post link redirects to post page`() { - addPost("post-id", mock()) - addHttpRequestParameter("query", "post://post-id") - verifyRedirect("viewPost.html?post=post-id") + addPost("Post-id", mock()) + addHttpRequestParameter("query", "post://Post-id") + verifyRedirect("viewPost.html?post=Post-id") } @Test fun `searching for a post ID without prefix redirects to post page`() { - addPost("post-id", mock()) + addPost("post-id", mock()) addHttpRequestParameter("query", "post-id") verifyRedirect("viewPost.html?post=post-id") } @@ -95,8 +95,8 @@ class SearchPageTest: WebPageTest({ template, webInterface -> SearchPage(templat @Test fun `searching for a reply link redirects to the post page`() { val postReply = mock().apply { whenever(postId).thenReturn("post-id") } - addPostReply("reply-id", postReply) - addHttpRequestParameter("query", "reply://reply-id") + addPostReply("Reply-id", postReply) + addHttpRequestParameter("query", "reply://Reply-id") verifyRedirect("viewPost.html?post=post-id") } @@ -110,28 +110,28 @@ class SearchPageTest: WebPageTest({ template, webInterface -> SearchPage(templat @Test fun `searching for an album link redirects to the image browser`() { - addAlbum("album-id", mock()) + addAlbum("album-id", mock()) addHttpRequestParameter("query", "album://album-id") verifyRedirect("imageBrowser.html?album=album-id") } @Test fun `searching for an album ID redirects to the image browser`() { - addAlbum("album-id", mock()) + addAlbum("album-id", mock()) addHttpRequestParameter("query", "album-id") verifyRedirect("imageBrowser.html?album=album-id") } @Test fun `searching for an image link redirects to the image browser`() { - addImage("image-id", mock()) + addImage("image-id", mock()) addHttpRequestParameter("query", "image://image-id") verifyRedirect("imageBrowser.html?image=image-id") } @Test fun `searching for an image ID redirects to the image browser`() { - addImage("image-id", mock()) + addImage("image-id", mock()) addHttpRequestParameter("query", "image-id") verifyRedirect("imageBrowser.html?image=image-id") }