Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-08-31 07:51:34 +0300
committerStan Hu <stanhu@gmail.com>2015-09-15 15:51:11 +0300
commitd3d03d1362e576d194782a655cdfe9bc6ed5c596 (patch)
tree0b720ea7ac0b5df7e968df83ce25d8e571617a56 /spec/services
parent080a086d7644285af6cd4fb4b51c8f1c9b3aec95 (diff)
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/services')
-rw-r--r--spec/services/event_create_service_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/services/event_create_service_spec.rb b/spec/services/event_create_service_spec.rb
index 007a9eed192..7756b973ecd 100644
--- a/spec/services/event_create_service_spec.rb
+++ b/spec/services/event_create_service_spec.rb
@@ -99,5 +99,15 @@ describe EventCreateService do
expect { service.close_milestone(milestone, user) }.to change { Event.count }
end
end
+
+ describe :destroy_mr do
+ let(:milestone) { create(:milestone) }
+
+ it { expect(service.destroy_milestone(milestone, user)).to be_truthy }
+
+ it "should create new event" do
+ expect { service.destroy_milestone(milestone, user) }.to change { Event.count }
+ end
+ end
end
end