diff --git a/hooks/test/test_test.go b/hooks/test/test_test.go index fabe46f..d69455b 100644 --- a/hooks/test/test_test.go +++ b/hooks/test/test_test.go @@ -12,6 +12,8 @@ func TestAllHooks(t *testing.T) { assert := assert.New(t) logger, hook := NewNullLogger() + assert.Nil(hook.LastEntry()) + assert.Equal(0, len(hook.Entries)) logger.Error("Hello error") assert.Equal(logrus.ErrorLevel, hook.LastEntry().Level) @@ -24,6 +26,7 @@ func TestAllHooks(t *testing.T) { assert.Equal(2, len(hook.Entries)) hook.Reset() + assert.Nil(hook.LastEntry()) assert.Equal(0, len(hook.Entries)) hook = NewGlobal()