init
This commit is contained in:
16
internal/jobdef/registry_test.go
Normal file
16
internal/jobdef/registry_test.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package jobdef
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestRegistryGetReturnsRegisteredHandler(t *testing.T) {
|
||||
registry := NewRegistry(SampleHandler{})
|
||||
|
||||
handler, ok := registry.Get("sample-handler")
|
||||
if !ok {
|
||||
t.Fatal("expected registered handler")
|
||||
}
|
||||
|
||||
if handler.Key() != "sample-handler" {
|
||||
t.Fatalf("handler key = %q, want sample-handler", handler.Key())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user