Commit ac14bd35 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch '29328-fix-transient-failure-in-model-user-spec' into 'master'

Resolve transient failure in spec/models/user_spec.rb

Closes #29328

See merge request !9892
parents 7e7409c4 ec660a6b
---
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