projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
🎨 Add helper for simulating first start
[Sone.git]
/
src
/
test
/
kotlin
/
net
/
pterodactylus
/
sone
/
web
/
notification
/
NewSoneHandlerTest.kt
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
..
0774992
100644
(file)
--- 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 net.pterodactylus.util.template.*
import org.hamcrest.MatcherAssert.*
import org.hamcrest.Matchers.*
-import java.io.*
import kotlin.test.*
class NewSoneHandlerTest {
import kotlin.test.*
class NewSoneHandlerTest {
@@
-55,9
+54,7
@@
class NewSoneHandlerTest {
@Test
fun `handler does not add notification on new sone event if first-start notification is present`() {
@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"))
}
eventBus.post(NewSoneFoundEvent(sone))
assertThat(notificationManager.notifications.single().id, equalTo("first-start-notification"))
}