From 7150a378172f087ab03e846f8428734250602d25 Mon Sep 17 00:00:00 2001 From: Joseph Kempster Date: Tue, 20 Feb 2024 11:42:31 +0000 Subject: [PATCH] Fix incorrect test Currently, the worldwide organisation example JSON is incorrect; it contains: - The link to "Personal information charter" as a corporate information page with a full URL - A secondary corporate information page with a relative URL. The former shouldn't be present, and this test relies on it's existence. This updates the test so that the corporate information page link can be removed in alphagov/publishing-api#2637 --- test/integration/worldwide_organisation_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/integration/worldwide_organisation_test.rb b/test/integration/worldwide_organisation_test.rb index c4b956380..c085c3336 100644 --- a/test/integration/worldwide_organisation_test.rb +++ b/test/integration/worldwide_organisation_test.rb @@ -57,7 +57,8 @@ class WorldwideOrganisationTest < ActionDispatch::IntegrationTest test "renders the secondary corporate information pages" do setup_and_visit_content_item("worldwide_organisation") - assert page.has_link?("Personal information charter", href: "https://www.integration.publishing.service.gov.uk/world/organisations/british-deputy-high-commission-hyderabad/about/personal-information-charter") + assert page.has_text?("Our Personal information charter explains how we treat your personal information.") + assert page.has_link?("Personal information charter", href: "/world/organisations/british-deputy-high-commission-hyderabad/about/personal-information-charter") end test "doesn't render the corporate pages section if there are no pages to show" do