mirror of
https://github.com/heartcombo/devise.git
synced 2026-04-28 03:00:29 -04:00
Merge pull request #3835 from kv109/master
test for save in after_create hook breaks devise confirmation [3787]
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user