summaryrefslogtreecommitdiff
path: root/spec/services/merge_requests/create_from_issue_service_spec.rb
diff options
context:
space:
mode:
authorPatrick Bajao <ebajao@gitlab.com>2019-06-28 14:08:26 -0800
committerPatrick Bajao <ebajao@gitlab.com>2019-06-29 00:22:09 +0800
commit1ca5520bd6f3447ada3a1120d2a3bd445ab6746a (patch)
tree30de757277f2948f38357fc78b3b1792975394d3 /spec/services/merge_requests/create_from_issue_service_spec.rb
parentac3de494bde32e4ce13bd665d1de3132b84c002d (diff)
downloadgitlab-ce-1ca5520bd6f3447ada3a1120d2a3bd445ab6746a.tar.gz
Fix issues when creating system notes58583-confidential-mr-branch-backend
When `confidential_issue_project_id` is set and the issue is under that project, create the a note about branch creation in that project. If not, do nothing. When creating `new_merge_request` system note, set the project where the MR will be referenced from so it'll be linked to when the MR is created in another project.
Diffstat (limited to 'spec/services/merge_requests/create_from_issue_service_spec.rb')
-rw-r--r--spec/services/merge_requests/create_from_issue_service_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/services/merge_requests/create_from_issue_service_spec.rb b/spec/services/merge_requests/create_from_issue_service_spec.rb
index 2c83b2851a1..0e0da6a13ab 100644
--- a/spec/services/merge_requests/create_from_issue_service_spec.rb
+++ b/spec/services/merge_requests/create_from_issue_service_spec.rb
@@ -48,7 +48,7 @@ describe MergeRequests::CreateFromIssueService do
end
it 'creates the new_merge_request system note' do
- expect(SystemNoteService).to receive(:new_merge_request).with(issue, target_project, user, instance_of(MergeRequest))
+ expect(SystemNoteService).to receive(:new_merge_request).with(issue, project, user, instance_of(MergeRequest))
service.execute
end
@@ -56,7 +56,7 @@ describe MergeRequests::CreateFromIssueService do
it 'creates the new_issue_branch system note when the branch could be created but the merge_request cannot be created' do
expect_any_instance_of(MergeRequest).to receive(:valid?).at_least(:once).and_return(false)
- expect(SystemNoteService).to receive(:new_issue_branch).with(issue, target_project, user, issue.to_branch_name)
+ expect(SystemNoteService).to receive(:new_issue_branch).with(issue, project, user, issue.to_branch_name, branch_project: target_project)
service.execute
end