Start and stop cron with no entries.
(t *testing.T)
| 84 | |
| 85 | // Start and stop cron with no entries. |
| 86 | func TestNoEntries(t *testing.T) { |
| 87 | cron := newWithSeconds() |
| 88 | cron.Start() |
| 89 | |
| 90 | select { |
| 91 | case <-time.After(OneSecond): |
| 92 | t.Fatal("expected cron will be stopped immediately") |
| 93 | case <-stop(cron): |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | // Start, stop, then add an entry. Verify entry doesn't run. |
| 98 | func TestStopCausesJobsToNotRun(t *testing.T) { |
nothing calls this directly
no test coverage detected