v1
This commit is contained in:
@@ -127,15 +127,6 @@ func dotest(ctx context.Context, db *sql.DB, t *testing.T) {
|
||||
t.Errorf("incorrect error on delete for non-existing id, want: %v, have: %v", repo.ErrNotFound, err)
|
||||
}
|
||||
|
||||
if err := r.Purge(ctx, testID); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
if err := r.Purge(ctx, testID); err == nil || !errors.Is(err, repo.ErrNotFound) {
|
||||
// can only purge once
|
||||
t.Errorf("incorrect error on delete for non-existing id, want: %v, have: %v", repo.ErrNotFound, err)
|
||||
}
|
||||
|
||||
if _, err := r.Read(ctx, incorrectID); err == nil || !errors.Is(err, repo.ErrNotFound) {
|
||||
t.Errorf("incorrect error on read for non-existing id, want: %v, have: %v", repo.ErrNotFound, err)
|
||||
}
|
||||
@@ -148,7 +139,4 @@ func dotest(ctx context.Context, db *sql.DB, t *testing.T) {
|
||||
t.Errorf("incorrect error on delete for non-existing id, want: %v, have: %v", repo.ErrNotFound, err)
|
||||
}
|
||||
|
||||
if err := r.Purge(ctx, incorrectID); err == nil || !errors.Is(err, repo.ErrNotFound) {
|
||||
t.Errorf("incorrect error on purge for non-existing id, want: %v, have: %v", repo.ErrNotFound, err)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user