Test that adding an invalid job spec returns an error
(t *testing.T)
| 373 | |
| 374 | // Test that adding an invalid job spec returns an error |
| 375 | func TestInvalidJobSpec(t *testing.T) { |
| 376 | cron := New() |
| 377 | _, err := cron.AddJob("this will not parse", nil) |
| 378 | if err == nil { |
| 379 | t.Errorf("expected an error with invalid spec, got nil") |
| 380 | } |
| 381 | } |
| 382 | |
| 383 | // Test blocking run method behaves as Start() |
| 384 | func TestBlockingRun(t *testing.T) { |