fix: Case insensitive email match (#6760)
Fixes: https://linear.app/chatwoot/issue/CW-1354/email-id-case-sensitive Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
@@ -89,4 +89,11 @@ RSpec.describe User do
|
||||
expect(user.will_save_change_to_email?).to be true
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the supplied email is uppercase' do
|
||||
it 'downcases the email on save' do
|
||||
new_user = create(:user, email: 'Test123@test.com')
|
||||
expect(new_user.email).to eq('test123@test.com')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user