summaryrefslogtreecommitdiff
path: root/spec/models/milestone_note_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-14 15:08:14 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-14 15:08:14 +0000
commit87f286558de1f5790b0b1742f10548387b5d147a (patch)
treec483d5f3542094d2123c8116ffee22430d9ad9c9 /spec/models/milestone_note_spec.rb
parent674e7e2c3d295704bdf504dd0caa2e5a2d9b5cd2 (diff)
downloadgitlab-ce-87f286558de1f5790b0b1742f10548387b5d147a.tar.gz
Add latest changes from gitlab-org/gitlab@master
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