diff --git a/app/controllers/atdis_controller.rb b/app/controllers/atdis_controller.rb index 8f94533cb..c5ea93efb 100644 --- a/app/controllers/atdis_controller.rb +++ b/app/controllers/atdis_controller.rb @@ -6,6 +6,11 @@ class AtdisController < ApplicationController sig { void } def test + if show_tailwind_theme? + redirect_to get_involved_path + return + end + if params[:url].present? feed = Feed.create_from_url(params[:url]) begin diff --git a/spec/requests/redirects_spec.rb b/spec/requests/redirects_spec.rb index 1e70c39c2..021df0dcf 100644 --- a/spec/requests/redirects_spec.rb +++ b/spec/requests/redirects_spec.rb @@ -60,5 +60,16 @@ get atdis_specification_path expect(response).to redirect_to "https://github.com/openaustralia/atdis/raw/master/docs/ATDIS-1.0.2%20Application%20Tracking%20Data%20Interchange%20Specification%20(v1.0.2).pdf" end + + it "does not redirect the test page in the origina design" do + get atdis_test_path + expect(response).not_to be_redirect + end + + it "redirects the test page to the get involved page in the new design" do + sign_in create(:confirmed_user, tailwind_theme: true) + get atdis_test_path + expect(response).to redirect_to get_involved_path + end end end