mirror of
https://github.com/discourse/discourse.git
synced 2025-09-10 17:26:30 +08:00
better consistency around email case sensitivity
This commit is contained in:
parent
c6ab9fec9d
commit
b24c1a1ad9
10 changed files with 62 additions and 35 deletions
|
@ -36,7 +36,6 @@ describe Invite do
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
context 'to a topic' do
|
||||
let!(:topic) { Fabricate(:topic) }
|
||||
let(:inviter) { topic.user }
|
||||
|
@ -97,8 +96,12 @@ describe Invite do
|
|||
topic.invite_by_email(inviter, 'iceking@adventuretime.ooo').should == @invite
|
||||
end
|
||||
|
||||
it 'matches case insensitively' do
|
||||
topic.invite_by_email(inviter, 'ICEKING@adventuretime.ooo').should == @invite
|
||||
it 'matches case insensitively for the domain part' do
|
||||
topic.invite_by_email(inviter, 'iceking@ADVENTURETIME.ooo').should == @invite
|
||||
end
|
||||
|
||||
it 'matches case sensitively for the local part' do
|
||||
topic.invite_by_email(inviter, 'ICEKING@adventuretime.ooo').should_not == @invite
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue