(t *testing.T)
| 504 | } |
| 505 | |
| 506 | func TestCmdAdd_InvalidJobName(t *testing.T) { |
| 507 | cb := &mockCallbacks{} |
| 508 | h := newTestHandler(cb) |
| 509 | |
| 510 | cb.extractKeyFn = func(fn Function) (string, string, bool) { |
| 511 | return "bad.name", "bad.name", true |
| 512 | } |
| 513 | |
| 514 | fn := newTestFn("test:bad.name", "add", "bad.name", []byte(`{}`)) |
| 515 | h.CmdAdd(fn) |
| 516 | |
| 517 | assert.Equal(t, 0, h.exposed.Count()) |
| 518 | } |
| 519 | |
| 520 | func TestCmdAdd_ParseError(t *testing.T) { |
| 521 | cb := &mockCallbacks{} |
nothing calls this directly
no test coverage detected
searching dependent graphs…