gitlab-org--gitlab-foss/spec/controllers
Douwe Maan 44cbfeaba8 Merge branch 'adam-fix-labels-find-or-create' into 'master'
Pass user instance to Labels::FindOrCreateService or skip_authorization: true

## What does this MR do?

It fixes a bug described in #23694 when `project.owner` was passed to `Labels::FindOrCreateService`. `Labels::FindOrCreateService` expected a user instance and `project.owner` may return a group as well. This MR makes sure that we either pass a user instance or `skip_authorization: true`.

## Are there points in the code the reviewer needs to double check?

- places where we pass `skip_authorization: true`

## Does this MR meet the acceptance criteria?

- Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [ ] 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?

Fixes #23694

See merge request !7093
2016-10-28 15:01:59 +00:00
..
admin Only show one error message for an invalid email 2016-10-27 15:46:28 -04:00
ci
groups Refactor create member tests from group_members_controller_spec 2016-10-24 13:14:00 +03:00
import modify github import JS and controller so we can now specify a namespace and/or name for a project. 2016-09-20 10:14:39 +02:00
oauth Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
profiles fixes part1 of files to start using active tense 2016-08-09 15:06:23 +01:00
projects Pass user instance to Labels::FindOrCreateService or skip_authorization: true 2016-10-28 11:31:45 +02:00
abuse_reports_controller_spec.rb
application_controller_spec.rb fixes part1 of files to start using active tense 2016-08-09 15:06:23 +01:00
autocomplete_controller_spec.rb Move to project dropdown with infinite scroll for better performance 2016-08-18 15:31:51 +02:00
blob_controller_spec.rb Fix Error 500 when viewing a blob with binary characters after the 1024-byte mark 2016-06-12 07:36:25 -07:00
groups_controller_spec.rb This fixes a long running tests due to changed Sidekiq state 2016-08-15 23:26:40 +02:00
health_check_controller_spec.rb Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
help_controller_spec.rb Fix failing spec on help controller 2016-07-22 11:49:09 +03:00
invites_controller_spec.rb Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
notification_settings_controller_spec.rb Merge branch 'master' into issue_3359_3 2016-06-29 11:32:38 -03:00
projects_controller_spec.rb Add visibility level to project repository 2016-10-17 18:12:18 -02:00
registrations_controller_spec.rb Assert against `ActionMailer::Base.deliveries` relatively. 2016-07-05 10:20:32 +05:30
root_controller_spec.rb
sent_notifications_controller_spec.rb Fix initial implementation to actually render the unsubscribe page 2016-09-20 09:52:57 +02:00
sessions_controller_spec.rb Restrict failed login attempts for users with 2FA 2016-10-04 15:01:38 +01:00
snippets_controller_spec.rb Add missing tests for download snippet 2016-10-13 18:08:15 +05:00
uploads_controller_spec.rb Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
users_controller_spec.rb Enforce the fork_project permission in Projects::CreateService 2016-09-27 13:17:56 +01:00