Skip to content

Commit

Permalink
Update devolved nations component tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-kirwan committed Oct 13, 2021
1 parent f57af25 commit 8f89d3e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/integration/detailed_guide_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class DetailedGuideTest < ActionDispatch::IntegrationTest
setup_and_visit_content_item("national_applicability_alternative_url_detailed_guide")
assert_has_devolved_nations_component("Applies to England, Scotland and Wales", [
{
text: "Northern Ireland",
text: "Guidance for Northern Ireland",
alternative_url: "http://www.dardni.gov.uk/news-dard-pa022-a-13-new-procedure-for",
},
])
Expand Down
6 changes: 3 additions & 3 deletions test/integration/publication_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ class PublicationTest < ActionDispatch::IntegrationTest
setup_and_visit_content_item("statistics_publication")
assert_has_devolved_nations_component("Applies to England", [
{
text: "Northern Ireland",
text: "Publication for Northern Ireland",
alternative_url: "http://www.dsdni.gov.uk/index/stats_and_research/stats-publications/stats-housing-publications/housing_stats.htm",
},
{
text: "Scotland",
text: "Publication for Scotland",
alternative_url: "http://www.scotland.gov.uk/Topics/Statistics/Browse/Housing-Regeneration/HSfS",
},
{
text: "Wales",
text: "Publication for Wales",
alternative_url: "http://wales.gov.uk/topics/statistics/headlines/housing2012/121025/?lang=en",
},
])
Expand Down
2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def assert_has_devolved_nations_component(text, nations = nil)
within(".gem-c-devolved-nations") do
assert page.has_text?(text)
nations&.each do |nation|
assert page.has_link?("Guidance for #{nation[:text]}", href: nation[:alternative_url])
assert page.has_link?(nation[:text], href: nation[:alternative_url])
end
end
end
Expand Down

0 comments on commit 8f89d3e

Please sign in to comment.