Resolve transient failure in spec/models/user_spec.rb
This commit is contained in:
parent
7e7409c46b
commit
ec660a6bc1
2 changed files with 7 additions and 2 deletions
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
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])
|
||||
|
|
Loading…
Reference in a new issue