Skip to content

Commit

Permalink
Extended test.
Browse files Browse the repository at this point in the history
  • Loading branch information
yawn committed Feb 22, 2016
1 parent be4b44b commit 0143a90
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hooks/test/test_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
Expand Down

0 comments on commit 0143a90

Please sign in to comment.