(t *testing.T)
| 37 | } |
| 38 | |
| 39 | func TestWithClock(t *testing.T) { |
| 40 | date := time.Date(2077, 1, 23, 10, 15, 13, 441, time.UTC) |
| 41 | clock := constantClock(date) |
| 42 | withLogger(t, DebugLevel, []Option{WithClock(clock)}, func(log *Logger, logs *observer.ObservedLogs) { |
| 43 | log.Info("") |
| 44 | require.Equal(t, 1, logs.Len(), "Expected only one log entry to be written.") |
| 45 | assert.Equal(t, date, logs.All()[0].Time, "Unexpected entry time.") |
| 46 | }) |
| 47 | } |
nothing calls this directly
no test coverage detected