🔥 Remove unnecessary imports
[Sone.git] / src / test / kotlin / net / pterodactylus / sone / web / pages / CreatePostPageTest.kt
index 2bf0c05..a6f5d9d 100644 (file)
@@ -1,9 +1,7 @@
 package net.pterodactylus.sone.web.pages
 
-import com.google.common.base.Optional.*
 import net.pterodactylus.sone.data.*
 import net.pterodactylus.sone.test.*
-import net.pterodactylus.sone.utils.*
 import net.pterodactylus.sone.web.*
 import net.pterodactylus.sone.web.page.*
 import net.pterodactylus.util.web.Method.*
@@ -40,7 +38,7 @@ class CreatePostPageTest : WebPageTest(::CreatePostPage) {
                addHttpRequestPart("returnPage", "return.html")
                addHttpRequestPart("text", "post text")
                verifyRedirect("return.html") {
-                       verify(core).createPost(currentSone, absent(), "post text")
+                       verify(core).createPost(currentSone, null, "post text")
                }
        }
 
@@ -62,7 +60,7 @@ class CreatePostPageTest : WebPageTest(::CreatePostPage) {
                val sender = mock<Sone>()
                addLocalSone("sender-id", sender)
                verifyRedirect("return.html") {
-                       verify(core).createPost(sender, absent(), "post text")
+                       verify(core).createPost(sender, null, "post text")
                }
        }
 
@@ -75,7 +73,7 @@ class CreatePostPageTest : WebPageTest(::CreatePostPage) {
                val recipient = mock<Sone>()
                addSone("recipient-id", recipient)
                verifyRedirect("return.html") {
-                       verify(core).createPost(currentSone, recipient.asOptional(), "post text")
+                       verify(core).createPost(currentSone, recipient, "post text")
                }
        }
 
@@ -86,7 +84,7 @@ class CreatePostPageTest : WebPageTest(::CreatePostPage) {
                addHttpRequestPart("text", "post http://localhost:12345/KSK@foo text")
                addHttpRequestHeader("Host", "localhost:12345")
                verifyRedirect("return.html") {
-                       verify(core).createPost(currentSone, absent(), "post KSK@foo text")
+                       verify(core).createPost(currentSone, null, "post KSK@foo text")
                }
        }