diff options
author | Rémy Coutable <remy@rymai.me> | 2016-05-18 20:56:13 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-05-19 01:43:40 +0300 |
commit | 0698113cabe68f23ac38d7b2fde6c5cb7e5bec4f (patch) | |
tree | 8c24a7da49c82d28079d9e3d69f68c77a61e37ce /spec/services | |
parent | 483c034b86262fb9b2c47df999d995f500b38eb4 (diff) |
Move #create_confidentiality_note to Issues::UpdateService
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/issues/update_service_spec.rb | 4 | ||||
-rw-r--r-- | spec/services/system_note_service_spec.rb | 14 |
2 files changed, 5 insertions, 13 deletions
diff --git a/spec/services/issues/update_service_spec.rb b/spec/services/issues/update_service_spec.rb index c9d8f1b382c..810a1f2d666 100644 --- a/spec/services/issues/update_service_spec.rb +++ b/spec/services/issues/update_service_spec.rb @@ -82,10 +82,10 @@ describe Issues::UpdateService, services: true do end it 'creates system note about confidentiality change' do - note = find_note('Marked as confidential') + note = find_note('Made the issue confidential') expect(note).not_to be_nil - expect(note.note).to eq 'Marked as confidential' + expect(note.note).to eq 'Made the issue confidential' end end diff --git a/spec/services/system_note_service_spec.rb b/spec/services/system_note_service_spec.rb index 4fa60436155..bffad59b8b6 100644 --- a/spec/services/system_note_service_spec.rb +++ b/spec/services/system_note_service_spec.rb @@ -244,24 +244,16 @@ describe SystemNoteService, services: true do to eq "Title changed from **Old title** to **#{noteable.title}**" end end - - context 'when noteable does not respond to `title' do - let(:noteable) { double('noteable') } - - it 'returns nil' do - expect(subject).to be_nil - end - end end - describe '.change_confidentiality' do - subject { described_class.change_confidentiality(noteable, project, author) } + describe '.change_issue_confidentiality' do + subject { described_class.change_issue_confidentiality(noteable, project, author) } context 'when noteable responds to `confidential`' do it_behaves_like 'a system note' it 'sets the note text' do - expect(subject.note).to eq "Marked as not confidential" + expect(subject.note).to eq 'Made the issue visible' end end end |