mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-09 14:58:05 -05:00
Add a test which checks for Case Mapping Collisions when resetting pw
See here for more information https://eng.getwisdom.io/hacking-github-with-unicode-dotless-i/
This commit is contained in:
@@ -33,6 +33,17 @@ class PasswordTest < Devise::IntegrationTest
|
||||
click_button 'Change my password'
|
||||
end
|
||||
|
||||
test 'reset password should send to user record email and avoid case mapping collisions' do
|
||||
create_user(email: 'luke@github.com')
|
||||
|
||||
request_forgot_password do
|
||||
fill_in 'email', with: 'luke@gıthub.com'
|
||||
end
|
||||
|
||||
mail = ActionMailer::Base.deliveries.last
|
||||
assert_equal ['luke@github.com'], mail.to
|
||||
end
|
||||
|
||||
test 'reset password with email of different case should succeed when email is in the list of case insensitive keys' do
|
||||
create_user(email: 'Foo@Bar.com')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user