gitlab-org--gitlab-foss/spec/services
Douwe Maan c003fc5091 Merge branch '23662-issue-move-user-reference-exception' into 'master'
Fix `User#to_reference`

## What does this MR do?

Fix the method signature of `User#to_reference` so that moving an issue with a user reference does not throw a "invalid number of arguments" exception.

## Why was this MR needed?

1. Changes in 8.13 require `Referable`s that don't have a project
   reference to accept two arguments - `from_project` and
   `target_project`.

2. `User#to_reference` was not changed to accept the
   `target_project` (even though it is not used). Moving an issue
   containing a user reference would throw a "invalid number of
   arguments" exception.

3. The regression was introduced in [c8b2b3f7](c8b2b3f7c3 (91fabb7ad88bd2fde6fef1c100a719c00e503047_75_79)), which expects
   all `Referable`s that don't respond to `:project` to have a `to_reference`
   method that takes two arguments.   

## Does this MR meet the acceptance criteria?

- Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

- Closes #23662

See merge request !7088
2016-10-25 10:54:48 +00:00
..
auth
boards Allow user to create a board list based on a group label 2016-10-19 14:58:24 -02:00
ci Space between subject and {, feedback: 2016-10-14 17:08:48 +08:00
files
groups
issuable
issues Merge branch '23662-issue-move-user-reference-exception' into 'master' 2016-10-25 10:54:48 +00:00
labels Avoid touch label links that does not belongs to project when moving it 2016-10-19 14:58:28 -02:00
members
merge_requests Ignore external issues when bulk assigning issues to author of merge request. 2016-10-20 16:40:24 +02:00
milestones
notes
projects Recreates missing group labels when moving project to another group 2016-10-19 14:58:24 -02:00
protected_branches
search
slash_commands allow multiple labels commands 2016-10-11 16:38:20 +01:00
compare_service_spec.rb Refactor straight compare diff code 2016-10-12 16:32:57 +03:00
create_deployment_service_spec.rb Merge remote-tracking branch 'origin/master' into 22191-delete-dynamic-envs-mr 2016-10-18 17:48:27 +02:00
create_release_service_spec.rb
create_snippet_service_spec.rb
create_tag_service_spec.rb
delete_tag_service_spec.rb
delete_user_service_spec.rb
destroy_group_service_spec.rb
event_create_service_spec.rb Differentiate the expire from leave event 2016-10-20 00:26:45 +00:00
git_hooks_service_spec.rb
git_push_service_spec.rb Prevent wrong markdown on issue ids when project has Jira service activated 2016-10-19 13:46:04 -02:00
git_tag_push_service_spec.rb
import_export_clean_up_service_spec.rb
notification_service_spec.rb Make guests unable to view MRs 2016-10-11 16:51:26 +03:00
repair_ldap_blocked_user_service_spec.rb
repository_archive_clean_up_service_spec.rb
search_service_spec.rb
system_hooks_service_spec.rb
system_note_service_spec.rb refactors tests because of gitlab-test repository changes 2016-10-11 16:33:06 +01:00
test_hook_service_spec.rb
todo_service_spec.rb Make guests unable to view MRs 2016-10-11 16:51:26 +03:00
update_release_service_spec.rb
update_snippet_service_spec.rb