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:
commit
2f7834245b
1 changed files with 14 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue