diff --git a/app/controllers/user_registrations_controller.rb b/app/controllers/user_registrations_controller.rb index 2a3b3aaaa8..787c8a9011 100644 --- a/app/controllers/user_registrations_controller.rb +++ b/app/controllers/user_registrations_controller.rb @@ -21,10 +21,6 @@ class UserRegistrationsController < Spree::UserRegistrationsController associate_user respond_to do |format| - format.html do - set_flash_message(:success, :signed_up_but_unconfirmed) - redirect_to after_sign_in_path_for(@user) - end format.js do render json: { email: @user.email } end diff --git a/spec/controllers/user_registrations_controller_spec.rb b/spec/controllers/user_registrations_controller_spec.rb index bb725945d2..ae2f671a2e 100644 --- a/spec/controllers/user_registrations_controller_spec.rb +++ b/spec/controllers/user_registrations_controller_spec.rb @@ -59,24 +59,4 @@ describe UserRegistrationsController, type: :controller do cookies[:locale] = original_locale_cookie end end - - context "when registration succeeds" do - context "when referer is not '/checkout'" do - it "redirects to root" do - spree_post :create, spree_user: {email: "test@test.com", password: "testy123", password_confirmation: "testy123"}, :use_route => :spree - expect(response).to redirect_to root_path - expect(assigns[:user].email).to eq("test@test.com") - end - end - - context "when referer is '/checkout'" do - before { @request.env['HTTP_REFERER'] = 'http://test.com/checkout' } - - it "redirects to checkout" do - spree_post :create, spree_user: {email: "test@test.com", password: "testy123", password_confirmation: "testy123"}, :use_route => :spree - expect(response).to redirect_to checkout_path - expect(assigns[:user].email).to eq("test@test.com") - end - end - end end