Skip to content
Snippets Groups Projects
Commit 63fcf137 authored by Mark Fletcher's avatar Mark Fletcher
Browse files

Fix Commits API to accept a Project path upon POST

parent de25604f
No related branches found
No related tags found
No related merge requests found
---
title: Fix Commits API to accept a Project path upon POST
merge_request:
author:
Loading
Loading
@@ -44,7 +44,6 @@ module API
detail 'This feature was introduced in GitLab 8.13'
end
params do
requires :id, type: Integer, desc: 'The project ID'
requires :branch_name, type: String, desc: 'The name of branch'
requires :commit_message, type: String, desc: 'Commit message'
requires :actions, type: Array[Hash], desc: 'Actions to perform in commit'
Loading
Loading
Loading
Loading
@@ -146,6 +146,16 @@ describe API::Commits, api: true do
 
expect(response).to have_http_status(400)
end
context 'with project path in URL' do
let(:url) { "/projects/#{project.namespace.path}%2F#{project.path}/repository/commits" }
it 'a new file in project repo' do
post api(url, user), valid_c_params
expect(response).to have_http_status(201)
end
end
end
 
context :delete do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment