projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
🐛 Fix sone-locked notification not showing all Sones
[Sone.git]
/
src
/
test
/
kotlin
/
net
/
pterodactylus
/
sone
/
web
/
notification
/
SoneLockedHandlerTest.kt
diff --git
a/src/test/kotlin/net/pterodactylus/sone/web/notification/SoneLockedHandlerTest.kt
b/src/test/kotlin/net/pterodactylus/sone/web/notification/SoneLockedHandlerTest.kt
index
2daf5c9
..
191168e
100644
(file)
--- a/
src/test/kotlin/net/pterodactylus/sone/web/notification/SoneLockedHandlerTest.kt
+++ b/
src/test/kotlin/net/pterodactylus/sone/web/notification/SoneLockedHandlerTest.kt
@@
-44,16
+44,18
@@
class SoneLockedHandlerTest {
SoneLockedHandler(notificationManager, notification, executor).also(eventBus::register)
}
SoneLockedHandler(notificationManager, notification, executor).also(eventBus::register)
}
+ @AfterTest
+ fun shutdownExecutor() = executor.shutdown()
+
@Test
@Test
- fun `notification is not added
during the first five minutes
`() {
+ fun `notification is not added
before the command is run
`() {
eventBus.post(SoneLockedEvent(sone))
assertThat(notificationManager.notifications, emptyIterable())
}
@Test
eventBus.post(SoneLockedEvent(sone))
assertThat(notificationManager.notifications, emptyIterable())
}
@Test
- fun `sone is added to notification
from command
`() {
+ fun `sone is added to notification
immediately
`() {
eventBus.post(SoneLockedEvent(sone))
eventBus.post(SoneLockedEvent(sone))
- executor.scheduledDelay.single().command.run()
assertThat(notification.elements, contains(sone))
}
assertThat(notification.elements, contains(sone))
}