📄 Update year in file headers
[Sone.git] / src / test / kotlin / net / pterodactylus / sone / web / notification / NewSoneHandlerTest.kt
index ff0947d..e099974 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * Sone - NewSoneHandlerTest.kt - Copyright Â© 2019 David â€˜Bombe’ Roden
+ * Sone - NewSoneHandlerTest.kt - Copyright Â© 2019–2020 David â€˜Bombe’ Roden
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -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>(notification)))
        }
 
        @Test