File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed
Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ def request_authentication
3535 end
3636
3737 def after_authentication_url
38- session . delete ( :return_to_after_authenticating ) || root_url
38+ session . delete ( :return_to_after_authenticating ) || regions_url
3939 end
4040
4141 def start_new_session_for ( user )
Original file line number Diff line number Diff line change 11require "rails_helper"
22
33RSpec . describe "User Login" , type : :system do
4+ # will probably need to be amended once we have a page for non-Admin users
45 let! ( :user ) { create ( :user ) }
56
6- # context "with correct email and password" do
7- # it "logs in the user" do
8- # visit new_session_path
9- # fill_in "email", with: user.email
10- # fill_in "password", with: user.password
11- # click_button("Sign in")
7+ context "with correct email and password" do
8+ it "logs in the user" do
9+ visit new_session_path
10+ fill_in "email" , with : user . email
11+ fill_in "password" , with : user . password
12+ click_button ( "Sign in" )
1213
13- # # will probably need to be amended once we have a page for non-Admin users
14- # expect(page).to have_text("Administration")
15- # end
16- # end
14+ expect ( page ) . to have_text ( "Regions Served" )
15+ end
16+ end
1717
1818 context "with incorrect email or password" do
1919 it "shows error message" do
You can’t perform that action at this time.
0 commit comments