diff options
author | Mark Fletcher <mark@gitlab.com> | 2017-01-03 04:14:31 +0300 |
---|---|---|
committer | Mark Fletcher <mark@gitlab.com> | 2017-01-03 04:16:38 +0300 |
commit | 63fcf1373957115893fd635142a786aa816bb69a (patch) | |
tree | f93ec167f68bcddf222ed471939951707c015927 /spec/requests | |
parent | de25604fbca2f7005754d821d571bbcb1cc510ac (diff) |
Fix Commits API to accept a Project path upon POST
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/commits_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/requests/api/commits_spec.rb b/spec/requests/api/commits_spec.rb index 964cded917c..7f8ea5251f0 100644 --- a/spec/requests/api/commits_spec.rb +++ b/spec/requests/api/commits_spec.rb @@ -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 |