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-09-17 11:04:37 +0300
committerStan Hu <stanhu@gmail.com>2015-09-17 11:04:37 +0300
commitf4816372457c3b513f8707efd87ce34c9922177c (patch)
tree534be1d81e56da85514b88dd47fde25a7cf093f1 /spec/services
parent2e9a7032cec02588484eb162717298d311770c7d (diff)
parentd3d03d1362e576d194782a655cdfe9bc6ed5c596 (diff)
Merge branch 'fix-issue-2382' into 'master'
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". Now if a milestone is destroyed, at least it will indicate in the activity feed even if it's not clear which milestone was destroyed: ![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/c89cc8a0a9fa549deac433f17b890913/image.png) Closes #2382 See merge request !1227
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