(t *testing.T)
| 28 | } |
| 29 | |
| 30 | func TestNewHandler(t *testing.T) { |
| 31 | log := zerolog.New(nil).With(). |
| 32 | Str("foo", "bar"). |
| 33 | Logger() |
| 34 | lh := NewHandler(log) |
| 35 | h := lh(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| 36 | l := FromRequest(r) |
| 37 | if !reflect.DeepEqual(*l, log) { |
| 38 | t.Fail() |
| 39 | } |
| 40 | })) |
| 41 | h.ServeHTTP(nil, &http.Request{}) |
| 42 | } |
| 43 | |
| 44 | func TestURLHandler(t *testing.T) { |
| 45 | out := &bytes.Buffer{} |
nothing calls this directly
no test coverage detected