Skip to content

Commit

Permalink
Fix test panic on unexpected pass
Browse files Browse the repository at this point in the history
  • Loading branch information
philippgille committed May 17, 2024
1 parent 6e7a96a commit dc34c3c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,9 @@ func TestCollection_QueryError(t *testing.T) {
for _, tc := range tt {
t.Run(tc.name, func(t *testing.T) {
err := tc.query()
if err.Error() != tc.expErr {
if err == nil {
t.Fatal("expected error, got nil")
} else if err.Error() != tc.expErr {
t.Fatal("expected", tc.expErr, "got", err)
}
})
Expand Down

0 comments on commit dc34c3c

Please sign in to comment.