summaryrefslogtreecommitdiff
path: root/spec/services/system_notes/issuables_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/system_notes/issuables_service_spec.rb')
-rw-r--r--spec/services/system_notes/issuables_service_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/services/system_notes/issuables_service_spec.rb b/spec/services/system_notes/issuables_service_spec.rb
index a914b34cb23..5023abad4cd 100644
--- a/spec/services/system_notes/issuables_service_spec.rb
+++ b/spec/services/system_notes/issuables_service_spec.rb
@@ -212,6 +212,15 @@ describe ::SystemNotes::IssuablesService do
it 'sets the note text' do
expect(subject.note).to eq('changed the description')
end
+
+ it 'associates the related description version' do
+ noteable.update!(description: 'New description')
+
+ description_version_id = subject.system_note_metadata.description_version_id
+
+ expect(description_version_id).not_to be_nil
+ expect(description_version_id).to eq(noteable.saved_description_version.id)
+ end
end
end