summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <zegerjan@gitlab.com>2016-05-14 11:33:14 +0200
committerStan Hu <stanhu@gmail.com>2016-05-28 03:14:43 -0700
commitbe613de2cfa96c7a17f734e532ba6ada0d81c7fe (patch)
tree2c318719a940e2a1ecdc33ff0bb0305bb3930958 /spec
parentf9bb9151b595fdc1afc1742bb51c816965908f53 (diff)
downloadgitlab-ce-be613de2cfa96c7a17f734e532ba6ada0d81c7fe.tar.gz
Project#show on projects pending deletion will 404zj-race-condition-pending-delete
fixes #17508
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/projects_controller_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb
index 91b46c4d65c..fba545560c7 100644
--- a/spec/controllers/projects_controller_spec.rb
+++ b/spec/controllers/projects_controller_spec.rb
@@ -115,6 +115,17 @@ describe ProjectsController do
expect(public_project_with_dot_atom).not_to be_valid
end
end
+
+ context 'when the project is pending deletions' do
+ it 'renders a 404 error' do
+ project = create(:project, pending_delete: true)
+ sign_in(user)
+
+ get :show, namespace_id: project.namespace.path, id: project.path
+
+ expect(response.status).to eq 404
+ end
+ end
end
describe "#update" do