(t *testing.T)
| 82 | } |
| 83 | |
| 84 | func TestEncoderHasQuery(t *testing.T) { |
| 85 | encoder, err := NewEncoder("/", "", http.Header{}) |
| 86 | if err != nil { |
| 87 | t.Fatalf("expected no error, got %v", err) |
| 88 | } |
| 89 | |
| 90 | if q := "i-dont-exist"; encoder.HasQuery(q) { |
| 91 | t.Errorf("expect %v not to be set", q) |
| 92 | } |
| 93 | |
| 94 | encoder.AddQuery("I-do-exist").String("some value") |
| 95 | |
| 96 | if q := "I-do-exist"; !encoder.HasQuery(q) { |
| 97 | t.Errorf("expect %v to be set", q) |
| 98 | } |
| 99 | |
| 100 | } |
| 101 | |
| 102 | func TestEncodeContentLength(t *testing.T) { |
| 103 | cases := map[string]struct { |
nothing calls this directly
no test coverage detected