Skip to content

Commit

Permalink
use MessageKey constant
Browse files Browse the repository at this point in the history
  • Loading branch information
gertd committed Aug 1, 2024
1 parent 975c0f7 commit 65ae6bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ func TestWithEmptyMsg(t *testing.T) {
err := ErrNotFound.Msg("")

fields := err.Fields()
assert.Nil(fields["msg"])
assert.Nil(fields[cerr.MessageKey])

err = ErrNotFound.Msg("bla")

fields = err.Fields()
assert.NotNil(fields["msg"])
assert.NotNil(fields[cerr.MessageKey])
}

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

0 comments on commit 65ae6bb

Please sign in to comment.