MCPcopy
hub / github.com/robfig/cron / TestInvalidJobSpec

Function TestInvalidJobSpec

cron_test.go:375–381  ·  cron_test.go::TestInvalidJobSpec

Test that adding an invalid job spec returns an error

(t *testing.T)

Source from the content-addressed store, hash-verified

373
374// Test that adding an invalid job spec returns an error
375func 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()
384func TestBlockingRun(t *testing.T) {

Callers

nothing calls this directly

Calls 2

NewFunction · 0.85
AddJobMethod · 0.80

Tested by

no test coverage detected