(t *testing.T)
| 132 | } |
| 133 | |
| 134 | func TestDuplicateName(t *testing.T) { |
| 135 | ctx := context.Background() |
| 136 | s := newTestStore(t) |
| 137 | if _, err := s.Create(ctx, "Dup", "", "a"); err != nil { |
| 138 | t.Fatalf("Create: %v", err) |
| 139 | } |
| 140 | _, err := s.Create(ctx, "Dup", "", "b") |
| 141 | if !isErr(err, ErrDuplicateName) { |
| 142 | t.Fatalf("expected ErrDuplicateName, got %v", err) |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | func TestInvalidName(t *testing.T) { |
| 147 | ctx := context.Background() |
nothing calls this directly
no test coverage detected