import net.pterodactylus.util.template.*
import org.hamcrest.MatcherAssert.*
import org.hamcrest.Matchers.*
+import java.util.concurrent.TimeUnit.*
import kotlin.test.*
/**
}
@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