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:
Diffstat (limited to 'spec/models/milestone_note_spec.rb')
-rw-r--r--spec/models/milestone_note_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/milestone_note_spec.rb b/spec/models/milestone_note_spec.rb
index 9e77ef91bb2..aad65cf0346 100644
--- a/spec/models/milestone_note_spec.rb
+++ b/spec/models/milestone_note_spec.rb
@@ -14,5 +14,15 @@ describe MilestoneNote do
it_behaves_like 'a system note', exclude_project: true do
let(:action) { 'milestone' }
end
+
+ context 'with a remove milestone event' do
+ let(:milestone) { create(:milestone) }
+ let(:event) { create(:resource_milestone_event, action: :remove, issue: noteable, milestone: milestone) }
+
+ it 'creates the expected note' do
+ expect(subject.note_html).to include('removed milestone')
+ expect(subject.note_html).not_to include('changed milestone to')
+ end
+ end
end
end