[#345] remove unneeded code

This commit is contained in:
Alexander Machehin 2014-03-21 15:48:04 +06:00
parent eb8326bf30
commit 54af9864af
1 changed files with 0 additions and 6 deletions

View File

@ -311,22 +311,16 @@ describe Projects::PullRequestsController do
it 'should send two email messages to project admins' do it 'should send two email messages to project admins' do
post :create, @create_params post :create, @create_params
@project.pull_requests.last.issue.send(:new_issue_notifications)
@project.pull_requests.last.issue.send(:send_assign_notifications)
ActionMailer::Base.deliveries.count.should == 2 ActionMailer::Base.deliveries.count.should == 2
end end
it 'should send two email messages to admins and one to assignee' do it 'should send two email messages to admins and one to assignee' do
post :create, @create_params.deep_merge(issue: {assignee_id: @project_reader.id}) post :create, @create_params.deep_merge(issue: {assignee_id: @project_reader.id})
@project.pull_requests.last.issue.send(:new_issue_notifications)
@project.pull_requests.last.issue.send(:send_assign_notifications)
ActionMailer::Base.deliveries.count.should == 3 ActionMailer::Base.deliveries.count.should == 3
end end
it 'should not duplicate email message' do it 'should not duplicate email message' do
post :create, @create_params.deep_merge(issue: {assignee_id: @project_admin.id}) post :create, @create_params.deep_merge(issue: {assignee_id: @project_admin.id})
@project.pull_requests.last.issue.send(:new_issue_notifications)
@project.pull_requests.last.issue.send(:send_assign_notifications)
ActionMailer::Base.deliveries.count.should == 2 # send only to admins ActionMailer::Base.deliveries.count.should == 2 # send only to admins
ActionMailer::Base.deliveries.first.to != ActionMailer::Base.deliveries.last.to ActionMailer::Base.deliveries.first.to != ActionMailer::Base.deliveries.last.to
end end