X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fnotification%2FNewSoneHandlerTest.kt;h=acdcf2f5fcb83b549716991e5c876dd15d01dd94;hb=ae15a32bcf71f56e4f5e7aff5e13a04ea1c88ad3;hp=ff0947dc9ee67fe81462972341b61671d7efb738;hpb=146335994dc415527bc4c8ec9a0981d739444ea8;p=Sone.git diff --git a/src/test/kotlin/net/pterodactylus/sone/web/notification/NewSoneHandlerTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/notification/NewSoneHandlerTest.kt index ff0947d..acdcf2f 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/notification/NewSoneHandlerTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/notification/NewSoneHandlerTest.kt @@ -26,7 +26,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.* class NewSoneHandlerTest { @@ -55,11 +54,9 @@ class NewSoneHandlerTest { @Test fun `handler does not add notification on new sone event if first-start notification is present`() { - notificationManager.addNotification(object : AbstractNotification("first-start-notification") { - override fun render(writer: Writer) = Unit - }) + notificationManager.firstStart() eventBus.post(NewSoneFoundEvent(sone)) - assertThat(notificationManager.notifications.single().id, equalTo("first-start-notification")) + assertThat(notificationManager.notifications, not(contains(notification))) } @Test