diff --git a/config/locales/en.yml b/config/locales/en.yml index 1549995c71..9f5fb546ed 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -198,6 +198,9 @@ en: already_registered: "This email address is already registered. Please log in to continue, or go back and use another email address." success: logged_in_succesfully: "Logged in successfully" + sessions: + signed_out: "Signed out successfully." + already_signed_out: "Signed out successfully." user_passwords: spree_user: updated_not_active: "Your password has been reset, but your email has not been confirmed yet." diff --git a/spec/controllers/spree/user_sessions_controller_spec.rb b/spec/controllers/spree/user_sessions_controller_spec.rb index fcbca67cf3..2885f53fc3 100644 --- a/spec/controllers/spree/user_sessions_controller_spec.rb +++ b/spec/controllers/spree/user_sessions_controller_spec.rb @@ -30,4 +30,13 @@ describe Spree::UserSessionsController, type: :controller do end end end + + describe "destroy" do + it "redirects to root with flash message" do + spree_post :destroy + + expect(response).to redirect_to root_path + expect(flash[:notice]).to eq "Signed out successfully." + end + end end