Actually differentiate between GET and POST parameters
[Sone.git] / src / test / kotlin / net / pterodactylus / sone / web / pages / UnfollowSonePageTest.kt
index 5bcd65f..e7e6786 100644 (file)
@@ -22,8 +22,8 @@ class UnfollowSonePageTest : WebPageTest() {
        @Test
        fun `post request unfollows a single sone and redirects to return page`() {
                request("", POST)
-               addHttpRequestParameter("returnPage", "return.html")
-               addHttpRequestParameter("sone", "sone-id")
+               addHttpRequestPart("returnPage", "return.html")
+               addHttpRequestPart("sone", "sone-id")
                verifyRedirect("return.html") {
                        verify(core).unfollowSone(currentSone, "sone-id")
                }
@@ -32,8 +32,8 @@ class UnfollowSonePageTest : WebPageTest() {
        @Test
        fun `post request unfollows two sones and redirects to return page`() {
                request("", POST)
-               addHttpRequestParameter("returnPage", "return.html")
-               addHttpRequestParameter("sone", "sone-id1, sone-id2")
+               addHttpRequestPart("returnPage", "return.html")
+               addHttpRequestPart("sone", "sone-id1, sone-id2")
                verifyRedirect("return.html") {
                        verify(core).unfollowSone(currentSone, "sone-id1")
                        verify(core).unfollowSone(currentSone, "sone-id2")