diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-02-02 18:27:30 +0300 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-02-06 19:52:29 +0300 |
commit | 1e56b3f476f9779ec747534e94156a6b8076209c (patch) | |
tree | e9374a520232a2d96ef55bf3089dd5350db0a900 /spec/requests/api/internal_spec.rb | |
parent | 839829a7786dd163eccb470bf251211bfb90bd72 (diff) |
Moves project creationg to git access check for git push
Diffstat (limited to 'spec/requests/api/internal_spec.rb')
-rw-r--r-- | spec/requests/api/internal_spec.rb | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/spec/requests/api/internal_spec.rb b/spec/requests/api/internal_spec.rb index 5ef180348aa..ea6b0a71849 100644 --- a/spec/requests/api/internal_spec.rb +++ b/spec/requests/api/internal_spec.rb @@ -386,32 +386,6 @@ describe API::Internal do expect(json_response["repository_path"]).to eq(project.repository.path_to_repo) expect(json_response["gl_repository"]).to eq("project-#{project.id}") end - - context 'when project does not exist' do - it 'creates a new project' do - path = "#{user.namespace.path}/notexist.git" - - expect do - push_with_path(key, path) - end.to change { Project.count }.by(1) - - expect(response).to have_gitlab_http_status(200) - expect(json_response["status"]).to be_truthy - expect(json_response["gitaly"]["repository"]["relative_path"]).to eq(path) - end - - it 'handles project creation failure' do - path = "#{user.namespace.path}/new.git" - - expect do - push_with_path(key, path) - end.not_to change { Project.count } - - expect(response).to have_gitlab_http_status(200) - expect(json_response["status"]).to be_falsey - expect(json_response["message"]).to eq("Could not create project: Path new is a reserved name") - end - end end end end |