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
/
NotificationHandlerModuleTest.kt
diff --git
a/src/test/kotlin/net/pterodactylus/sone/web/notification/NotificationHandlerModuleTest.kt
b/src/test/kotlin/net/pterodactylus/sone/web/notification/NotificationHandlerModuleTest.kt
index
ea5db56
..
7d96208
100644
(file)
--- a/
src/test/kotlin/net/pterodactylus/sone/web/notification/NotificationHandlerModuleTest.kt
+++ b/
src/test/kotlin/net/pterodactylus/sone/web/notification/NotificationHandlerModuleTest.kt
@@
-37,7
+37,6
@@
import org.hamcrest.Matchers
import org.hamcrest.Matchers.*
import org.mockito.*
import org.mockito.Mockito.*
import org.hamcrest.Matchers.*
import org.mockito.*
import org.mockito.Mockito.*
-import java.io.*
import java.util.concurrent.*
import java.util.concurrent.TimeUnit.*
import java.util.function.*
import java.util.concurrent.*
import java.util.concurrent.TimeUnit.*
import java.util.function.*
@@
-75,9
+74,7
@@
class NotificationHandlerModuleTest {
@Test
fun `mark-post-known-during-first-start handler is created with correct action`() {
@Test
fun `mark-post-known-during-first-start handler is created with correct action`() {
- notificationManager.addNotification(object : AbstractNotification("first-start-notification") {
- override fun render(writer: Writer?) = Unit
- })
+ notificationManager.firstStart()
val handler = injector.getInstance<MarkPostKnownDuringFirstStartHandler>()
val post = mock<Post>()
handler.newPostFound(NewPostFoundEvent(post))
val handler = injector.getInstance<MarkPostKnownDuringFirstStartHandler>()
val post = mock<Post>()
handler.newPostFound(NewPostFoundEvent(post))