From 1e198ed74a22af8272b0393328ad9f94796617f8 Mon Sep 17 00:00:00 2001 From: Peter Hartshorn Date: Thu, 26 May 2022 15:12:20 +0100 Subject: [PATCH] Fix failing test 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. --- test/presenters/content_item/manual_section_test.rb | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/test/presenters/content_item/manual_section_test.rb b/test/presenters/content_item/manual_section_test.rb index 63f532f95..8dbfe3ad9 100644 --- a/test/presenters/content_item/manual_section_test.rb +++ b/test/presenters/content_item/manual_section_test.rb @@ -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)