Prefer to_json over JSON.generate when simple strings in stub request (#38258)

This commit is contained in:
Matt Jankowski authored and GitHub committed 2026-03-17 16:10:54 +00:00
1 parent f3035a8e51
commit b320c9e4c9
25 files changed
+177 -138

No files matched your search

@@ -91,7 +91,7 @@ RSpec.describe 'Donation campaigns' do
end
before do
stub_request(:get, "#{api_url}?platform=web&seed=#{seed}&locale=en").to_return(body: JSON.generate(campaign_json), status: 200)
stub_request(:get, "#{api_url}?platform=web&seed=#{seed}&locale=en").to_return(body: campaign_json.to_json, status: 200)
end
it 'returns the expected campaign' do