(t *testing.T)
| 151 | } |
| 152 | |
| 153 | func TestErrorHookShouldntFireOnInfo(t *testing.T) { |
| 154 | hook := new(ErrorHook) |
| 155 | |
| 156 | LogAndAssertJSON(t, func(log *Logger) { |
| 157 | log.Hooks.Add(hook) |
| 158 | log.Info("test") |
| 159 | }, func(fields Fields) { |
| 160 | assert.False(t, hook.Fired) |
| 161 | }) |
| 162 | } |
| 163 | |
| 164 | func TestErrorHookShouldFireOnError(t *testing.T) { |
| 165 | hook := new(ErrorHook) |
nothing calls this directly
no test coverage detected