Skip to content

Commit

Permalink
Fix incorrect test
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jkempster34 committed Feb 20, 2024
1 parent 3de5210 commit 7150a37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/integration/worldwide_organisation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7150a37

Please sign in to comment.