diff options
author | George Andrinopoulos <geoandri@gmail.com> | 2017-03-13 13:05:15 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-03-13 13:05:15 +0300 |
commit | ec660a6bc1ac23963067698d38516eae2da232ed (patch) | |
tree | 5e0a969f1055aa40148f39d789dd44dfa63dd8b3 /spec/models/user_spec.rb | |
parent | 7e7409c46bcec2edc5c1e7c4e7809977069048d7 (diff) |
Resolve transient failure in spec/models/user_spec.rb
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r-- | spec/models/user_spec.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index adb5b538922..3166b951a42 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -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]) |