Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-04-09 22:30:52 +0300
committerNick Thomas <nick@gitlab.com>2019-04-09 22:40:12 +0300
commitf9b4d5efbde0bf3b6b1822177d47199ad2f02fbd (patch)
treefd2a63aa1396cf36bca3ed31aa362c166522a547 /spec/services/merge_requests
parent41e36b05def9ebf2b800a04d067367f7571bae9d (diff)
Fix MR assignees for push options
With multiple MR assignees, `merge_request.assignee_id` is always nil, and `merge_request.assignee_ids` isn't in `merge_request.attributes`. So the existing code doesn't set assignees in the created MR. This fix gets all the tests passing, but we should also check that no other associations in the MergeRequest need similar fixups.
Diffstat (limited to 'spec/services/merge_requests')
-rw-r--r--spec/services/merge_requests/push_options_handler_service_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/services/merge_requests/push_options_handler_service_spec.rb b/spec/services/merge_requests/push_options_handler_service_spec.rb
index 686b4b49f24..f7a39bb42d5 100644
--- a/spec/services/merge_requests/push_options_handler_service_spec.rb
+++ b/spec/services/merge_requests/push_options_handler_service_spec.rb
@@ -38,7 +38,7 @@ describe MergeRequests::PushOptionsHandlerService do
it 'assigns the MR to the user' do
service.execute
- expect(last_mr.assignee).to eq(user)
+ expect(last_mr.assignees).to contain_exactly(user)
end
context 'when project has been forked' do