Skip to content
Snippets Groups Projects
Commit 2f145352 authored by Rémy Coutable's avatar Rémy Coutable
Browse files

Merge branch 'fix-make-email-static' into 'master'

Make sure alias email would never match original user

See merge request !10037
parents f016da62 46287f36
No related branches found
No related tags found
No related merge requests found
......@@ -699,7 +699,9 @@ describe User, models: true do
let!(:user) { create(:user, name: 'John Doe', username: 'john.doe', email: 'john.doe@example.com' ) }
let!(:another_user) { create(:user, name: 'Albert Smith', username: 'albert.smith', email: 'albert.smith@example.com' ) }
let!(:email) { create(:email, user: another_user) }
let!(:email) do
create(:email, user: another_user, email: 'alias@example.com')
end
it 'returns users with a matching name' do
expect(search_with_secondary_emails(user.name)).to eq([user])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment