fixes
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package catalog
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
func TestValidateCloneCompanies(t *testing.T) {
|
||||
t.Parallel()
|
||||
a := uuid.MustParse("11111111-1111-4111-8111-111111111111")
|
||||
b := uuid.MustParse("22222222-2222-4222-8222-222222222222")
|
||||
|
||||
if err := validateCloneCompanies(uuid.Nil, b); err == nil {
|
||||
t.Fatal("expected error for nil source")
|
||||
}
|
||||
if err := validateCloneCompanies(a, uuid.Nil); err == nil {
|
||||
t.Fatal("expected error for nil dest")
|
||||
}
|
||||
if err := validateCloneCompanies(a, a); err == nil {
|
||||
t.Fatal("expected error for src==dest")
|
||||
}
|
||||
if err := validateCloneCompanies(a, b); err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user