1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Merge pull request #3835 from kv109/master

test for save in after_create hook breaks devise confirmation [3787]
This commit is contained in:
Lucas Mazza 2015-12-15 11:36:47 -02:00
commit 2f7834245b

View file

@ -486,4 +486,18 @@ class ReconfirmableTest < ActiveSupport::TestCase
:unconfirmed_email
]
end
test 'should not require reconfirmation after creating a record' do
user = create_admin
assert !user.pending_reconfirmation?
end
test 'should not require reconfirmation after creating a record with #save called in callback' do
class Admin::WithSaveInCallback < Admin
after_create :save
end
user = Admin::WithSaveInCallback.create(valid_attributes.except(:username))
assert !user.pending_reconfirmation?
end
end