mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
add test for after_database_authentication
This commit is contained in:
parent
910868785c
commit
6f88df3453
1 changed files with 11 additions and 0 deletions
|
@ -81,4 +81,15 @@ class DatabaseAuthenticationTest < ActionDispatch::IntegrationTest
|
||||||
assert_contain 'Invalid credentials'
|
assert_contain 'Invalid credentials'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test 'valid sign in calls after_database_authentication callback' do
|
||||||
|
user = create_user(email: ' foo@bar.com ')
|
||||||
|
|
||||||
|
User.expects(:find_for_database_authentication).returns user
|
||||||
|
user.expects :after_database_authentication
|
||||||
|
|
||||||
|
sign_in_as_user do
|
||||||
|
fill_in 'email', with: 'foo@bar.com'
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue