summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-08-28 07:49:09 +0000
committerSean McGivern <sean@mcgivern.me.uk>2018-08-28 07:49:09 +0000
commit722631a9290e07cc0d83baf7bf332223ab7cf8b6 (patch)
tree3e1b00852e04cb76236a985e57a3afa6d37ebc68 /spec/controllers
parent881ba3f5977dafda7feee77f841ace290c918a8d (diff)
parentabb50ff4710e264c0c700df88757ee3ab1cf7dfb (diff)
downloadgitlab-ce-722631a9290e07cc0d83baf7bf332223ab7cf8b6.tar.gz
Merge branch 'issue_36138' into 'master'
Allow to delete group milestones Closes #36138 See merge request gitlab-org/gitlab-ce!21057
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/groups/milestones_controller_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/controllers/groups/milestones_controller_spec.rb b/spec/controllers/groups/milestones_controller_spec.rb
index f7068546093..465f3499703 100644
--- a/spec/controllers/groups/milestones_controller_spec.rb
+++ b/spec/controllers/groups/milestones_controller_spec.rb
@@ -141,6 +141,17 @@ describe Groups::MilestonesController do
end
end
+ describe "#destroy" do
+ let(:milestone) { create(:milestone, group: group) }
+
+ it "removes milestone" do
+ delete :destroy, group_id: group.to_param, id: milestone.iid, format: :js
+
+ expect(response).to be_success
+ expect { Milestone.find(milestone.id) }.to raise_exception(ActiveRecord::RecordNotFound)
+ end
+ end
+
describe '#ensure_canonical_path' do
before do
sign_in(user)