Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete frontend parts of case studies #3332

Merged
merged 2 commits into from
Jul 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions app/controllers/case_studies_controller.rb

This file was deleted.

8 changes: 0 additions & 8 deletions app/views/case_studies/_document_sidebar.html.erb

This file was deleted.

2 changes: 0 additions & 2 deletions app/views/case_studies/show.html.erb

This file was deleted.

3 changes: 2 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,11 @@ def external_redirect(path_prefix, target)
resources :publications, only: [:index, :show], localised: true
get "/publications/:publication_id/:id" => 'html_attachments#show', as: 'publication_html_attachment'

# TODO: Remove when paths can be generated without a routes entry
resources :case_studies, path: 'case-studies', only: [:show], localised: true
resources :speeches, only: [:show], localised: true
# TODO: Remove when paths can be generated without a routes entry
resources :statistical_data_sets, path: 'statistical-data-sets', only: [:show]

get "/speeches" => redirect("/announcements")

# Controller removed for stats announce show. Whitehall frontend no longer serves these
Expand Down
48 changes: 0 additions & 48 deletions test/functional/case_studies_controller_test.rb

This file was deleted.

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