From bd9534b7993e97ff512897bfb3f35f749247a1d6 Mon Sep 17 00:00:00 2001 From: Lisa Ugray Date: Wed, 2 Jan 2019 14:59:36 -0500 Subject: [PATCH] Test Log --- logrus_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/logrus_test.go b/logrus_test.go index afa41d2..c1505ab 100644 --- a/logrus_test.go +++ b/logrus_test.go @@ -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")