(t *testing.T)
| 64 | } |
| 65 | |
| 66 | func TestEncoderHasHeader(t *testing.T) { |
| 67 | encoder, err := NewEncoder("/", "", http.Header{}) |
| 68 | if err != nil { |
| 69 | t.Fatalf("expected no error, got %v", err) |
| 70 | } |
| 71 | |
| 72 | if h := "i-dont-exist"; encoder.HasHeader(h) { |
| 73 | t.Errorf("expect %v not to be set", h) |
| 74 | } |
| 75 | |
| 76 | encoder.AddHeader("I-do-exist").String("some value") |
| 77 | |
| 78 | if h := "I-do-exist"; !encoder.HasHeader(h) { |
| 79 | t.Errorf("expect %v to be set", h) |
| 80 | } |
| 81 | |
| 82 | } |
| 83 | |
| 84 | func TestEncoderHasQuery(t *testing.T) { |
| 85 | encoder, err := NewEncoder("/", "", http.Header{}) |
nothing calls this directly
no test coverage detected