diff options
author | Stan Hu <stanhu@gmail.com> | 2015-08-30 21:51:34 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-09-15 05:51:11 -0700 |
commit | d3d03d1362e576d194782a655cdfe9bc6ed5c596 (patch) | |
tree | 0b720ea7ac0b5df7e968df83ce25d8e571617a56 /spec/controllers/projects/milestones_controller_spec.rb | |
parent | 080a086d7644285af6cd4fb4b51c8f1c9b3aec95 (diff) | |
download | gitlab-ce-d3d03d1362e576d194782a655cdfe9bc6ed5c596.tar.gz |
Create a "destroyed Milestone" event and keep Milestone events around in the DB
for posterity.
Also fix issue where destroying a Milestone would cause odd, transient messages like
"created milestone" or "imported milestone".
Add "in" preposition when creating and destroying milestones
Closes #2382
Diffstat (limited to 'spec/controllers/projects/milestones_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/milestones_controller_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/controllers/projects/milestones_controller_spec.rb b/spec/controllers/projects/milestones_controller_spec.rb index d3868c13202..35446640929 100644 --- a/spec/controllers/projects/milestones_controller_spec.rb +++ b/spec/controllers/projects/milestones_controller_spec.rb @@ -15,8 +15,12 @@ describe Projects::MilestonesController do describe "#destroy" do it "should remove milestone" do expect(issue.milestone_id).to eq(milestone.id) + delete :destroy, namespace_id: project.namespace.id, project_id: project.id, id: milestone.id, format: :js expect(response).to be_success + + expect(Event.first.action).to eq(Event::DESTROYED) + expect { Milestone.find(milestone.id) }.to raise_exception(ActiveRecord::RecordNotFound) issue.reload expect(issue.milestone_id).to eq(nil) |