Skip to content

Commit

Permalink
test: fix GET /log test (#233)
Browse files Browse the repository at this point in the history
GET /logs test wasn't properly checking for createdAt ordering.
  • Loading branch information
bfabio authored Mar 19, 2024
1 parent 78dac8e commit 6f57a24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2778,6 +2778,7 @@ func TestLogsEndpoints(t *testing.T) {
assert.Nil(t, links["prev"])
assert.Nil(t, links["next"])

var prevCreatedAt *time.Time = nil
for _, l := range data {
assert.IsType(t, map[string]interface{}{}, l)
log := l.(map[string]interface{})
Expand Down Expand Up @@ -2806,7 +2807,6 @@ func TestLogsEndpoints(t *testing.T) {
assert.Nil(t, log["entity"])
}

var prevCreatedAt *time.Time = nil
for key := range log {
assert.Contains(t, []string{"id", "createdAt", "updatedAt", "message", "entity"}, key)
}
Expand Down

0 comments on commit 6f57a24

Please sign in to comment.