Skip to content

Commit

Permalink
Redirect atdis test page
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Mar 5, 2024
1 parent 407fe56 commit 5358b21
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/controllers/atdis_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions spec/requests/redirects_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5358b21

Please sign in to comment.