From 0143a90f6e89a7a01f3386742b544a6fe5f9f66c Mon Sep 17 00:00:00 2001 From: Joern Barthel Date: Fri, 9 Oct 2015 16:07:14 +0200 Subject: [PATCH] Extended test. --- hooks/test/test_test.go | 3 +++ 1 file changed, 3 insertions(+) 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()