Skip to content

Commit

Permalink
Merge pull request #22 from jhawthorn/fix_registration_errors
Browse files Browse the repository at this point in the history
Fix registration errors
  • Loading branch information
jhawthorn committed Oct 26, 2015
2 parents dd99355 + 4ec53f8 commit 438890c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ def check_permissions

private
def spree_user_params
params.require(:spree_user).permit(Spree::PermittedAttributes.user_attributes)
params.require(:spree_user).permit(Spree::PermittedAttributes.user_attributes | [:email])
end
end
2 changes: 1 addition & 1 deletion lib/controllers/frontend/spree/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def update

private
def user_params
params.require(:user).permit(Spree::PermittedAttributes.user_attributes)
params.require(:user).permit(Spree::PermittedAttributes.user_attributes | [:email])
end

def load_object
Expand Down
8 changes: 6 additions & 2 deletions spec/features/confirmation_spec.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
require 'spec_helper'

feature 'Confirmation' do
before do
skip "this introduces a run order dependency"
end

before do
set_confirmable_option(true)
Spree::UserMailer.stub(:confirmation_instructions).and_return(double(deliver: true))
end

after(:each) { set_confirmable_option(false) }
#after(:each) { set_confirmable_option(false) }

let!(:store) { create(:store) }

Expand All @@ -25,4 +29,4 @@
expect(page).to have_text 'You have signed up successfully.'
expect(Spree::User.last.confirmed?).to be(false)
end
end
end

0 comments on commit 438890c

Please sign in to comment.