summaryrefslogtreecommitdiff
path: root/spec/requests
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2018-02-22 10:51:00 -0800
committerStan Hu <stanhu@gmail.com>2018-02-24 16:22:29 -0800
commit4be20ba923c010c105e30ef8bba3b9bf82b2d0ca (patch)
tree33d714281823bc7f21739a3f11a4328f6c3b7030 /spec/requests
parentb9ed721bc23ef2debe321393c2bc161a60912e5e (diff)
downloadgitlab-ce-4be20ba923c010c105e30ef8bba3b9bf82b2d0ca.tar.gz
Respond 404 when repo does not existmk/fix-error-code-for-repo-does-not-exist
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/git_http_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/requests/git_http_spec.rb b/spec/requests/git_http_spec.rb
index c6fdda203ad..1b0a5eac9b0 100644
--- a/spec/requests/git_http_spec.rb
+++ b/spec/requests/git_http_spec.rb
@@ -597,7 +597,7 @@ describe 'Git HTTP requests' do
context "when a gitlab ci token is provided" do
let(:project) { create(:project, :repository) }
let(:build) { create(:ci_build, :running) }
- let(:other_project) { create(:project) }
+ let(:other_project) { create(:project, :repository) }
before do
build.update!(project: project) # can't associate it on factory create
@@ -648,10 +648,10 @@ describe 'Git HTTP requests' do
context 'when the repo does not exist' do
let(:project) { create(:project) }
- it 'rejects pulls with 403 Forbidden' do
+ it 'rejects pulls with 404 Not Found' do
clone_get path, env
- expect(response).to have_gitlab_http_status(:forbidden)
+ expect(response).to have_gitlab_http_status(:not_found)
expect(response.body).to eq(git_access_error(:no_repo))
end
end