Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/emails/create_service_spec.rb')
-rw-r--r--spec/services/emails/create_service_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/services/emails/create_service_spec.rb b/spec/services/emails/create_service_spec.rb
index 1396a1fce30..2fabf4ae66a 100644
--- a/spec/services/emails/create_service_spec.rb
+++ b/spec/services/emails/create_service_spec.rb
@@ -3,7 +3,8 @@
require 'spec_helper'
RSpec.describe Emails::CreateService do
- let(:user) { create(:user) }
+ let_it_be(:user) { create(:user) }
+
let(:opts) { { email: 'new@email.com', user: user } }
subject(:service) { described_class.new(user, opts) }
@@ -22,7 +23,7 @@ RSpec.describe Emails::CreateService do
it 'has the right user association' do
service.execute
- expect(user.emails).to eq(Email.where(opts))
+ expect(user.emails).to include(Email.find_by(opts))
end
end
end