This commit is contained in:
Lisa Ugray 2019-01-02 14:59:36 -05:00
parent e8fd0ba609
commit bd9534b799
1 changed files with 9 additions and 0 deletions

View File

@ -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")