diff options
author | Stan Hu <stanhu@gmail.com> | 2016-04-06 21:10:24 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-04-06 21:11:10 -0700 |
commit | 924e4b370013ae3a8448a2a68e6a4d353b23b699 (patch) | |
tree | a39ea1e7e6a0b11d3a04cc963e8525e3c0df9762 /spec/controllers | |
parent | 8f0945311b8f5fe30b0b57739ee9f3262499f375 (diff) | |
download | gitlab-ce-924e4b370013ae3a8448a2a68e6a4d353b23b699.tar.gz |
Return status code 303 after a branch DELETE operation to avoid project deletion
Closes #14994
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects/branches_controller_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/controllers/projects/branches_controller_spec.rb b/spec/controllers/projects/branches_controller_spec.rb index 98ae424ed7c..8ad73472117 100644 --- a/spec/controllers/projects/branches_controller_spec.rb +++ b/spec/controllers/projects/branches_controller_spec.rb @@ -93,6 +93,20 @@ describe Projects::BranchesController do end end + describe "POST destroy with HTML format" do + render_views + + it 'returns 303' do + post :destroy, + format: :html, + id: 'foo/bar/baz', + namespace_id: project.namespace.to_param, + project_id: project.to_param + + expect(response.status).to eq(303) + end + end + describe "POST destroy" do render_views |