Skip to content

Commit

Permalink
Test travel alert status renders correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
hannalaakso committed Sep 20, 2023
1 parent b9a68cf commit 928f64d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion config/i18n-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ data:
ignore_unused:
- 'content_item.schema_name.*.{one,other,zero,few,many,two}'
- 'corporate_information_page.*'
- 'travel_advice.alert_status.*'
- 'publication.documents.other'
7 changes: 5 additions & 2 deletions test/presenters/travel_advice_presenter_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,11 @@ def schema_name
test "presents alert statuses" do
example = schema_item("full-country")
example["details"]["alert_status"] = %w[avoid_all_but_essential_travel_to_parts avoid_all_travel_to_parts]
assert present_example(example).alert_status.include?("advise against all but essential travel")
assert present_example(example).alert_status.include?("advise against all travel to parts")

presented = present_example(example)

assert presented.alert_status.first.include?("advise against all but essential travel to parts of #{presented.country_name}")
assert presented.alert_status.last.include?("advise against all travel to parts of #{presented.country_name}")
end

test "metadata uses today for 'Still current at'" do
Expand Down

0 comments on commit 928f64d

Please sign in to comment.