From 25989ab7ef1a444ed2abd5479f176d58e1d9462a Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 18 Oct 2019 11:11:44 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/services/note_summary_spec.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'spec/services/note_summary_spec.rb') diff --git a/spec/services/note_summary_spec.rb b/spec/services/note_summary_spec.rb index e59731207a5..aa4e41f4d8c 100644 --- a/spec/services/note_summary_spec.rb +++ b/spec/services/note_summary_spec.rb @@ -46,5 +46,17 @@ describe NoteSummary do it 'returns metadata hash' do expect(create_note_summary.metadata).to eq(action: 'icon', commit_count: 5) end + + context 'description action and noteable has saved_description_version' do + before do + noteable.saved_description_version = 1 + end + + subject { described_class.new(noteable, project, user, 'note', action: 'description') } + + it 'sets the description_version metadata' do + expect(subject.metadata).to include(description_version: 1) + end + end end end -- cgit v1.2.1