mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-09 14:58:05 -05:00
test for save in after_create hook breaks devise confirmation [3787]
This commit is contained in:
@@ -476,4 +476,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