Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
richardpattinson committed Jan 13, 2025
1 parent cdb61cc commit 1e5b2dc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def current_dsi_user
def authenticate_dsi_user!
if current_dsi_user.blank?
flash[:warning] = "You need to sign in to continue."
redirect_to sign_in_path
redirect_to "/auth/dfe"
end
end

Expand Down
5 changes: 5 additions & 0 deletions app/controllers/start_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class StartController < ApplicationController
def start
redirect_to search_path
end
end
2 changes: 2 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Rails.application.routes.draw do
root to: "searches#new"

get "/start", to: "start#start"

get "/search", to: "searches#new"
get "/result", to: "searches#show"

Expand Down
2 changes: 1 addition & 1 deletion spec/requests/authentication_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
it "redirects to sign-in" do
get "/", env: { "HTTP_AUTHORIZATION" => credentials }
expect(response).to have_http_status(:redirect)
expect(response).to redirect_to("/sign-in")
expect(response).to redirect_to("/auth/dfe")
end
end
end
Expand Down

0 comments on commit 1e5b2dc

Please sign in to comment.