Fix notify specs. Fix merge request close via api

This commit is contained in:
Dmitriy Zaporozhets 2013-03-28 13:24:01 +02:00
parent 2f585840db
commit 63e6f055f1
2 changed files with 4 additions and 2 deletions

View file

@ -94,6 +94,8 @@ module Gitlab
authorize! :modify_merge_request, merge_request
MergeRequestObserver.current_user = current_user
if merge_request.update_attributes attrs
merge_request.reload_code
merge_request.mark_as_unchecked

View file

@ -107,7 +107,7 @@ describe Notify do
let(:issue) { create(:issue, assignee: assignee, project: project ) }
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'
@ -172,7 +172,7 @@ describe Notify do
let(:merge_request) { create(:merge_request, assignee: assignee, project: project) }
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'