Skip to content

Commit 7150a37

Browse files
committed
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
1 parent 3de5210 commit 7150a37

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/integration/worldwide_organisation_test.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ class WorldwideOrganisationTest < ActionDispatch::IntegrationTest
5757

5858
test "renders the secondary corporate information pages" do
5959
setup_and_visit_content_item("worldwide_organisation")
60-
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")
60+
assert page.has_text?("Our Personal information charter explains how we treat your personal information.")
61+
assert page.has_link?("Personal information charter", href: "/world/organisations/british-deputy-high-commission-hyderabad/about/personal-information-charter")
6162
end
6263

6364
test "doesn't render the corporate pages section if there are no pages to show" do

0 commit comments

Comments
 (0)