diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-11-17 16:51:39 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-11-17 16:51:39 +0100 |
commit | 80a2eb5d50102ff8e0dcfb67994acc3037b0270e (patch) | |
tree | 3dd1915997a23c2202a8c47a600fa2a651a15de5 /spec | |
parent | 8c308e3df6b2c9b259f66172d13cc81009c1ae89 (diff) | |
download | gitlab-ce-80a2eb5d50102ff8e0dcfb67994acc3037b0270e.tar.gz |
Fix spec
Diffstat (limited to 'spec')
-rw-r--r-- | spec/services/issues/update_service_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/services/issues/update_service_spec.rb b/spec/services/issues/update_service_spec.rb index 4e79484f26a..6a9053753c1 100644 --- a/spec/services/issues/update_service_spec.rb +++ b/spec/services/issues/update_service_spec.rb @@ -3,13 +3,15 @@ require 'spec_helper' describe Issues::UpdateService do let(:user) { create(:user) } let(:user2) { create(:user) } - let(:issue) { create(:issue, title: 'Old title', assignee_id: user.id) } + let(:user3) { create(:user) } + let(:issue) { create(:issue, title: 'Old title', assignee_id: user3.id) } let(:label) { create(:label) } let(:project) { issue.project } before do project.team << [user, :master] project.team << [user2, :developer] + project.team << [user3, :developer] end describe 'execute' do @@ -35,10 +37,10 @@ describe Issues::UpdateService do it { expect(@issue.labels.first.title).to eq('Bug') } it 'should send email to user2 about assign of new issue and email to user about issue unassignment' do - deliveries = ActionMailer::Base.deliveries + deliveries = ActionMailer::Base.deliveries email = deliveries.last - recipients = deliveries.map(&:to).uniq.flatten - expect(recipients.last(2)).to include(user.email,user2.email) + recipients = deliveries.last(2).map(&:to).flatten + expect(recipients).to include(user2.email, user3.email) expect(email.subject).to include(issue.title) end |