diff --git a/app/controllers/qualifications/users/sign_out_controller.rb b/app/controllers/qualifications/users/sign_out_controller.rb index bbf9f832..8c7c5214 100644 --- a/app/controllers/qualifications/users/sign_out_controller.rb +++ b/app/controllers/qualifications/users/sign_out_controller.rb @@ -28,6 +28,7 @@ def create end def complete + redirect_to qualifications_root_path end end end diff --git a/spec/system/qualifications/user_signs_out_spec.rb b/spec/system/qualifications/user_signs_out_spec.rb index 44c4bbb1..f70178ee 100644 --- a/spec/system/qualifications/user_signs_out_spec.rb +++ b/spec/system/qualifications/user_signs_out_spec.rb @@ -11,9 +11,7 @@ and_i_am_signed_in_via_identity when_i_click_the_sign_out_link and_confirm_my_sign_out - then_i_see_the_confirmation_page - when_i_click_the_button_to_take_me_back_to_the_service - then_i_am_on_service_start_page + then_i_am_on_service_sign_in_page end private @@ -30,8 +28,8 @@ def and_confirm_my_sign_out click_button "Confirm" end - def then_i_see_the_confirmation_page - expect(page).to have_content "You are now signed out" + def then_i_am_on_service_sign_in_page + expect(page).to have_current_path qualifications_sign_in_path end def when_i_click_the_button_to_take_me_back_to_the_service diff --git a/spec/system/qualifications/user_signs_out_via_onelogin_spec.rb b/spec/system/qualifications/user_signs_out_via_onelogin_spec.rb index 16c99af7..a78179c1 100644 --- a/spec/system/qualifications/user_signs_out_via_onelogin_spec.rb +++ b/spec/system/qualifications/user_signs_out_via_onelogin_spec.rb @@ -12,9 +12,7 @@ and_i_am_signed_in_via_onelogin when_i_click_the_sign_out_link and_confirm_my_sign_out - then_i_see_the_confirmation_page - when_i_click_the_button_to_take_me_back_to_the_service - then_i_am_on_service_start_page + then_i_see_the_sign_in_page end private @@ -31,16 +29,8 @@ def and_confirm_my_sign_out click_button "Confirm" end - def then_i_see_the_confirmation_page - expect(page).to have_content "You are now signed out" - end - - def when_i_click_the_button_to_take_me_back_to_the_service - click_link "Back to GOV.UK" - end - - def then_i_am_on_service_start_page - expect(page).to have_current_path qualifications_start_path + def then_i_see_the_sign_in_page + expect(page).to have_current_path qualifications_sign_in_path end end