diff options
author | Robert Speicher <robert@gitlab.com> | 2016-02-29 17:50:40 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-02-29 17:50:40 +0000 |
commit | edf5e9eb05ce4a3aa68740f5139dc333a4f887d4 (patch) | |
tree | 6bddeb7ad0aee9d95000165cedd2fbfc0798fb45 /spec | |
parent | 6f85eb38516ae23969c34eab3d31f85bb5df9177 (diff) | |
parent | 3ac202c30f3fdabc5189d411dfe5e7871b948070 (diff) | |
download | gitlab-ce-edf5e9eb05ce4a3aa68740f5139dc333a4f887d4.tar.gz |
Merge branch 'fix/project-wiki-ending' into 'master'
Fix for project paths ending in .wiki
This prevents `Git operation was rejected by pre-receive hook` when
an actual project ending with .wiki is thought to be a wiki by the
`Internal` API.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/13742
See merge request !2960
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/internal_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/requests/api/internal_spec.rb b/spec/requests/api/internal_spec.rb index 8d0ae1475c2..22802dd0e05 100644 --- a/spec/requests/api/internal_spec.rb +++ b/spec/requests/api/internal_spec.rb @@ -54,6 +54,18 @@ describe API::API, api: true do project.team << [user, :developer] end + context "git push with project.wiki" do + it 'responds with success' do + project_wiki = create(:project, name: 'my.wiki', path: 'my.wiki') + project_wiki.team << [user, :developer] + + push(key, project_wiki) + + expect(response.status).to eq(200) + expect(json_response["status"]).to be_truthy + end + end + context "git pull" do it do pull(key, project) |