🎨 Add helper for simulating first start
[Sone.git] / src / test / kotlin / net / pterodactylus / sone / web / notification / NewRemotePostHandlerTest.kt
index 5e4e5fc..a0d7bc6 100644 (file)
@@ -27,7 +27,6 @@ import net.pterodactylus.util.notify.*
 import net.pterodactylus.util.template.*
 import org.hamcrest.MatcherAssert.*
 import org.hamcrest.Matchers.*
-import java.io.*
 import kotlin.test.*
 
 /**
@@ -71,9 +70,7 @@ class NewRemotePostHandlerTest {
 
        @Test
        fun `handler does not add notification to notification manager during first start`() {
-               notificationManager.addNotification(object : AbstractNotification("first-start-notification") {
-                       override fun render(writer: Writer?) = Unit
-               })
+               notificationManager.firstStart()
                eventBus.post(NewPostFoundEvent(remotePost))
                assertThat(notificationManager.notifications, not(hasItem(notification)))
        }