summaryrefslogtreecommitdiff
path: root/spec/requests/api/v3
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-04-06 19:58:53 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2018-04-11 10:51:17 +0200
commit71ccfde322b633e9245bee6acba1e64cb7640f19 (patch)
treee81b9d66257711bd9a3dd31d70d623b1a1927502 /spec/requests/api/v3
parent083b0a9b034a0e4004c012444f1a8811bd96ed29 (diff)
downloadgitlab-ce-71ccfde322b633e9245bee6acba1e64cb7640f19.tar.gz
Correct permissions for creating merge requests from issues
This could only be possible for users that can create merge requests within a project. So they need to be a allowed to create a branch and create a merge request.
Diffstat (limited to 'spec/requests/api/v3')
-rw-r--r--spec/requests/api/v3/merge_requests_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/requests/api/v3/merge_requests_spec.rb b/spec/requests/api/v3/merge_requests_spec.rb
index 6b748369f0d..be70cb24dce 100644
--- a/spec/requests/api/v3/merge_requests_spec.rb
+++ b/spec/requests/api/v3/merge_requests_spec.rb
@@ -340,7 +340,7 @@ describe API::MergeRequests do
expect(json_response['title']).to eq('Test merge_request')
end
- it "returns 422 when target project has disabled merge requests" do
+ it "returns 403 when target project has disabled merge requests" do
project.project_feature.update(merge_requests_access_level: 0)
post v3_api("/projects/#{forked_project.id}/merge_requests", user2),
@@ -350,7 +350,7 @@ describe API::MergeRequests do
author: user2,
target_project_id: project.id
- expect(response).to have_gitlab_http_status(422)
+ expect(response).to have_gitlab_http_status(403)
end
it "returns 400 when source_branch is missing" do