summaryrefslogtreecommitdiff
path: root/spec/controllers/groups
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2018-08-06 16:02:52 -0300
committerFelipe Artur <felipefac@gmail.com>2018-08-06 17:31:47 -0300
commitabb50ff4710e264c0c700df88757ee3ab1cf7dfb (patch)
treea77ce62f4384becfe7b36fa1ae7fea700895812f /spec/controllers/groups
parentcb2e07309b4e61501a44c3568155bdb73252338f (diff)
downloadgitlab-ce-abb50ff4710e264c0c700df88757ee3ab1cf7dfb.tar.gz
Allow to delete group milestonesissue_36138
Diffstat (limited to 'spec/controllers/groups')
-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)