Commit 63e6f055 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix notify specs. Fix merge request close via api

parent 2f585840
...@@ -94,6 +94,8 @@ module Gitlab ...@@ -94,6 +94,8 @@ module Gitlab
authorize! :modify_merge_request, merge_request authorize! :modify_merge_request, merge_request
MergeRequestObserver.current_user = current_user
if merge_request.update_attributes attrs if merge_request.update_attributes attrs
merge_request.reload_code merge_request.reload_code
merge_request.mark_as_unchecked merge_request.mark_as_unchecked
......
...@@ -107,7 +107,7 @@ describe Notify do ...@@ -107,7 +107,7 @@ describe Notify do
let(:issue) { create(:issue, assignee: assignee, project: project ) } let(:issue) { create(:issue, assignee: assignee, project: project ) }
describe 'that are new' do describe 'that are new' do
subject { Notify.new_issue_email(issue.id) } subject { Notify.new_issue_email(issue.assignee_id, issue.id) }
it_behaves_like 'an assignee email' it_behaves_like 'an assignee email'
...@@ -172,7 +172,7 @@ describe Notify do ...@@ -172,7 +172,7 @@ describe Notify do
let(:merge_request) { create(:merge_request, assignee: assignee, project: project) } let(:merge_request) { create(:merge_request, assignee: assignee, project: project) }
describe 'that are new' do describe 'that are new' do
subject { Notify.new_merge_request_email(merge_request.id) } subject { Notify.new_merge_request_email(merge_request.assignee_id, merge_request.id) }
it_behaves_like 'an assignee email' it_behaves_like 'an assignee email'
......
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