X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fnotification%2FStartupHandlerTest.kt;fp=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fnotification%2FStartupHandlerTest.kt;h=bc2c8e6902d0c32d4b04f6938fafc8744f03e717;hb=fc2922b836c9f23242135c752653507a573917ea;hp=38e7f1b74a3b8677bef7a1624df0cc5b2c476bd4;hpb=043ae80d779448ceb2cf9fcff5d8942a5db7b0bf;p=Sone.git diff --git a/src/test/kotlin/net/pterodactylus/sone/web/notification/StartupHandlerTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/notification/StartupHandlerTest.kt index 38e7f1b..bc2c8e6 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/notification/StartupHandlerTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/notification/StartupHandlerTest.kt @@ -24,6 +24,7 @@ import net.pterodactylus.util.notify.* import net.pterodactylus.util.template.* import org.hamcrest.MatcherAssert.* import org.hamcrest.Matchers.* +import java.util.concurrent.TimeUnit.* import kotlin.test.* /** @@ -50,9 +51,9 @@ class StartupHandlerTest { } @Test - fun `handler registers command on startup`() { + fun `handler registers command on with 2-minute delay`() { eventBus.post(Startup()) - assertThat(executor.scheduleds, hasSize(1)) + assertThat(with(executor.scheduleds.single()) { timeUnit.toNanos(delay) }, equalTo(MINUTES.toNanos(2))) } @Test