diff options
author | Nick Thomas <nick@gitlab.com> | 2019-04-09 20:30:52 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-04-09 20:40:12 +0100 |
commit | f9b4d5efbde0bf3b6b1822177d47199ad2f02fbd (patch) | |
tree | fd2a63aa1396cf36bca3ed31aa362c166522a547 /spec/services | |
parent | 41e36b05def9ebf2b800a04d067367f7571bae9d (diff) | |
download | gitlab-ce-f9b4d5efbde0bf3b6b1822177d47199ad2f02fbd.tar.gz |
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')
-rw-r--r-- | spec/services/merge_requests/push_options_handler_service_spec.rb | 2 |
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 |