Skip to content

Commit

Permalink
test(core): expect empty slice instead of nil error
Browse files Browse the repository at this point in the history
  • Loading branch information
ayuhito committed Jun 16, 2024
1 parent 61aa383 commit bf4a9a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/db/sqlite/websites_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ func TestListWebsitesNotFound(t *testing.T) {
assert, ctx, client := SetupDatabase(t)

websites, err := client.ListWebsites(ctx, "doesnotexist")
assert.Nil(websites)
assert.ErrorIs(err, model.ErrWebsiteNotFound)
assert.NoError(err)
assert.NotNil(websites)
assert.Len(websites, 0)
}

func TestGetWebsite(t *testing.T) {
Expand Down

0 comments on commit bf4a9a4

Please sign in to comment.