| 81 | } |
| 82 | |
| 83 | func TestBuild_FuzzInQuery(t *testing.T) { |
| 84 | rc := &RequestConfig{ |
| 85 | Method: "GET", |
| 86 | Headers: make(http.Header), |
| 87 | RawQuery: "key={{FUZZ}}&other=static", |
| 88 | } |
| 89 | req, err := rc.Build(context.Background(), STANDARD, "http://example.com", "/search", "", "test") |
| 90 | if err != nil { |
| 91 | t.Fatal(err) |
| 92 | } |
| 93 | uri := req.URI() |
| 94 | if uri != "http://example.com/search?key=test&other=static" { |
| 95 | t.Errorf("URI = %q, want http://example.com/search?key=test&other=static", uri) |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | func TestBuild_NoFuzz(t *testing.T) { |
| 100 | rc := &RequestConfig{ |