BigW Consortium Gitlab

Commit 7ed08fcd by Tony Rom

Fix style

parent fd88b0ca
......@@ -444,8 +444,6 @@ Parameters:
- `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `merge_request_iid` (required) - The internal ID of the merge request
Example of response
```json
[
{
......
......@@ -24,8 +24,9 @@ module API
.preload(:notes, :author, :assignee, :milestone, :latest_merge_request_diff, :labels, :timelogs)
end
def merge_request_pipelines_with_access(access_level = :read_pipeline)
authorize! access_level, user_project
def merge_request_pipelines_with_access
authorize! :read_pipeline, user_project
mr = find_merge_request_with_access(params[:merge_request_iid])
mr.all_pipelines
end
......
......@@ -546,6 +546,12 @@ describe API::MergeRequests do
expect(response).to have_gitlab_http_status(200)
expect(response).to match_response_schema('public_api/v4/pipelines')
end
it 'returns 404 if MR does not exist' do
get api("/projects/#{project.id}/merge_requests/777/pipelines")
expect(response).to have_gitlab_http_status(404)
end
end
context 'when unauthorized' do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment