Commit fabdcf81 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'hardcode-title-system-note' into 'master'

Ensure autogenerated title does not cause failing spec

Closes #26933

See merge request !8693
parents b525aff6 6c3e59a5
---
title: Ensure autogenerated title does not cause failing spec
merge_request: 8963
author: brian m. carlson
...@@ -245,6 +245,8 @@ describe SystemNoteService, services: true do ...@@ -245,6 +245,8 @@ describe SystemNoteService, services: true do
end end
describe '.change_title' do describe '.change_title' do
let(:noteable) { create(:issue, project: project, title: 'Lorem ipsum') }
subject { described_class.change_title(noteable, project, author, 'Old title') } subject { described_class.change_title(noteable, project, author, 'Old title') }
context 'when noteable responds to `title`' do context 'when noteable responds to `title`' do
...@@ -252,7 +254,7 @@ describe SystemNoteService, services: true do ...@@ -252,7 +254,7 @@ describe SystemNoteService, services: true do
it 'sets the note text' do it 'sets the note text' do
expect(subject.note). expect(subject.note).
to eq "changed title from **{-Old title-}** to **{+#{noteable.title}+}**" to eq "changed title from **{-Old title-}** to **{+Lorem ipsum+}**"
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment