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

Ensure autogenerated title does not cause failing spec

Closes #26933

See merge request !8693
This commit is contained in:
Rémy Coutable 2017-01-30 09:16:50 +00:00
commit fabdcf818b
2 changed files with 7 additions and 1 deletions

View file

@ -0,0 +1,4 @@
---
title: Ensure autogenerated title does not cause failing spec
merge_request: 8963
author: brian m. carlson

View file

@ -245,6 +245,8 @@ describe SystemNoteService, services: true do
end
describe '.change_title' do
let(:noteable) { create(:issue, project: project, title: 'Lorem ipsum') }
subject { described_class.change_title(noteable, project, author, 'Old title') }
context 'when noteable responds to `title`' do
@ -252,7 +254,7 @@ describe SystemNoteService, services: true do
it 'sets the note text' do
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