Skip to content

Commit

Permalink
Test Log
Browse files Browse the repository at this point in the history
  • Loading branch information
Lisa Ugray committed Jan 2, 2019
1 parent e8fd0ba commit bd9534b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions logrus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,15 @@ func TestWarn(t *testing.T) {
})
}

func TestLog(t *testing.T) {
LogAndAssertJSON(t, func(log *Logger) {
log.Log(WarnLevel, "test")
}, func(fields Fields) {
assert.Equal(t, "test", fields["msg"])
assert.Equal(t, "warning", fields["level"])
})
}

func TestInfolnShouldAddSpacesBetweenStrings(t *testing.T) {
LogAndAssertJSON(t, func(log *Logger) {
log.Infoln("test", "test")
Expand Down

0 comments on commit bd9534b

Please sign in to comment.