diff options
Diffstat (limited to 'spec/services/note_summary_spec.rb')
-rw-r--r-- | spec/services/note_summary_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
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 |