diff --git a/pkg/recon/sources/github_test.go b/pkg/recon/sources/github_test.go index cbe8ce6..6b9f856 100644 --- a/pkg/recon/sources/github_test.go +++ b/pkg/recon/sources/github_test.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" "errors" - "fmt" "net/http" "net/http/httptest" "strings" @@ -144,8 +143,8 @@ func TestGitHubSource_ProviderNameFromKeyword(t *testing.T) { // Track which query came in so we can assert providerName mapping per-call. srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - q := r.URL.Query().Get("q") - body := fmt.Sprintf(`{"items":[{"html_url":"https://example/%s","repository":{"full_name":"o/r"}}]}`, q) + // Query contains spaces/quotes — don't interpolate it into JSON. + body := `{"items":[{"html_url":"https://example/x","repository":{"full_name":"o/r"}}]}` w.Header().Set("Content-Type", "application/json") _, _ = w.Write([]byte(body)) }))