diff options
author | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2016-05-14 12:33:14 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-05-28 13:14:43 +0300 |
commit | be613de2cfa96c7a17f734e532ba6ada0d81c7fe (patch) | |
tree | 2c318719a940e2a1ecdc33ff0bb0305bb3930958 /spec/controllers | |
parent | f9bb9151b595fdc1afc1742bb51c816965908f53 (diff) |
Project#show on projects pending deletion will 404
fixes #17508
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects_controller_spec.rb | 11 |
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 |