Commit ec660a6b authored by George Andrinopoulos's avatar George Andrinopoulos Committed by Rémy Coutable

Resolve transient failure in spec/models/user_spec.rb

parent 7e7409c4
---
title: Add custom attributes in factories
merge_request: 9892
author: George Andrinopoulos
......@@ -713,8 +713,9 @@ describe User, models: true do
describe '.search_with_secondary_emails' do
delegate :search_with_secondary_emails, to: :described_class
let!(:user) { create(:user) }
let!(:email) { create(:email) }
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) }
it 'returns users with a matching name' do
expect(search_with_secondary_emails(user.name)).to eq([user])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment