(t *testing.T)
| 70 | } |
| 71 | |
| 72 | func TestHookCanModifyEntry(t *testing.T) { |
| 73 | hook := new(ModifyHook) |
| 74 | |
| 75 | LogAndAssertJSON(t, func(log *Logger) { |
| 76 | log.Hooks.Add(hook) |
| 77 | log.WithField("wow", "elephant").Print("test") |
| 78 | }, func(fields Fields) { |
| 79 | assert.Equal(t, "whale", fields["wow"]) |
| 80 | }) |
| 81 | } |
| 82 | |
| 83 | func TestCanFireMultipleHooks(t *testing.T) { |
| 84 | hook1 := new(ModifyHook) |
nothing calls this directly
no test coverage detected