Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
This test failed on CI as the gds-api-adapters version had been bumped,
meaning the hardcoded user-agent version was no longer the same and the
stub failed to match the request.
  • Loading branch information
1pretz1 committed May 26, 2022
1 parent baa39e7 commit 1e198ed
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions test/presenters/content_item/manual_section_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,8 @@ def initialize

test "returns manual_content_item" do
stub_request(:get, "https://content-store.test.gov.uk/content/a/base/path")
.with(
headers: {
"Accept" => "application/json",
"Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
"Host" => "content-store.test.gov.uk",
"User-Agent" => "gds-api-adapters/79.1.2 ()",
},
)
.to_return(status: 200, body: "{}", headers: {})
.to_return(status: 200, body: "{}", headers: {})

item = DummyContentItem.new

assert_equal({}, item.manual_content_item.parsed_content)
Expand Down

0 comments on commit 1e198ed

Please sign in to comment.