Skip to content

Commit

Permalink
Assert nil/empty values are equal
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSisley committed Feb 18, 2022
1 parent 4271e67 commit 2351fae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions db/tests/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,9 @@ func assertQueryResults(t *testing.T, description string, result *client.QueryRe

// compare results
assert.Equal(t, len(expectedResults), len(resultantData), description)
if len(expectedResults) == 0 {
assert.Equal(t, expectedResults, resultantData)
}
for i, result := range resultantData {
assert.Equal(t, expectedResults[i], result, description)
}
Expand Down

0 comments on commit 2351fae

Please sign in to comment.