2
0

Replace EmailHelper module with normalizes via model concern (#35702)

This commit is contained in:
Matt Jankowski
2025-08-07 09:47:47 -04:00
committed by GitHub
parent 496a5f423e
commit a485f97d21
4 changed files with 47 additions and 25 deletions

View File

@@ -7,6 +7,14 @@ RSpec.describe CanonicalEmailBlock do
it { is_expected.to belong_to(:reference_account).class_name('Account').optional }
end
describe 'Normalizations' do
describe 'email' do
it { is_expected.to normalize(:email).from('TEST@HOST.EXAMPLE').to('test@host.example') }
it { is_expected.to normalize(:email).from('test+more@host.example').to('test@host.example') }
it { is_expected.to normalize(:email).from('test.user@host.example').to('testuser@host.example') }
end
end
describe 'Scopes' do
describe '.matching_email' do
subject { described_class.matching_email(email) }