Entire fixture body.
package articlecontent import ( "context" "github.com/tradarr/backend/internal/scraper" "io" "net/http" "strings" "testing" ) func TestAcceptedListingURLsUseHTTPSAndKeepListingIdentity(t *testing.T) { for _, tc := range []struct{ source, listing, fetch string }{{"yahoo_finance", "http://finance.yahoo.com/m/fixture/story?story=1#fragment", "https://finance.yahoo.com/m/fixture/story?story=1"}, {"cnbc_business", "http://www.cnbc.com/business/story?story=1#fragment", "https://www.cnbc.com/business/story?story=1"}} { t.Run(tc.source, func(t *testing.T) { calls := 0 root := "caas-body" if tc.source == "cnbc_business" { root = "ArticleBody-articleBody" } client := &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { calls++ if r.URL.String() != tc.fetch { t.Fatal("unexpected fetch identity") } body := `
Entire fixture editorial body.
Entire fixture editorial body.
Entire fixture body.
Entire fixture body.
Entire fixture body.