Skip to content

Commit

Permalink
Remove case study from canonicalisation test
Browse files Browse the repository at this point in the history
* This logic doesn’t need to be handled by Whitehall
* Note: government-frontend doesn’t do this redirect:
https://www.gov.uk/government/case-studies/bis-criminal-prosecutions?loc
ale=en
  • Loading branch information
fofr committed Jul 7, 2017
1 parent 3160bb7 commit d3ee9a3
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions test/integration/document_locale_param_canonicalisation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,15 @@ def with_locale_param(path, locale)
u.to_s
end

document_types_with_no_index = %w(case_study)
normal_document_types = [
"world_location_news_article",
"publication",
"consultation",
]

(document_types_with_no_index + normal_document_types).each do |doc_type|
%w{world_location_news_article publication consultation}.each do |doc_type|
test "visiting a #{doc_type} with a spurious locale=en param will redirect to remove it" do
canonical_path = send("#{doc_type}_path", "a-#{doc_type}")
extra_path = with_locale_param(canonical_path, 'en')
get extra_path

assert_redirected_to canonical_path
end
end

normal_document_types.each do |doc_type|
test "visiting the #{doc_type} index with a spurious locale=en param will redirect to remove it" do
canonical_path = send("#{doc_type.pluralize}_path")
extra_path = with_locale_param(canonical_path, 'en')
Expand Down

0 comments on commit d3ee9a3

Please sign in to comment.