Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-05-18 20:56:13 +0300
committerRémy Coutable <remy@rymai.me>2016-05-19 01:43:40 +0300
commit0698113cabe68f23ac38d7b2fde6c5cb7e5bec4f (patch)
tree8c24a7da49c82d28079d9e3d69f68c77a61e37ce /spec
parent483c034b86262fb9b2c47df999d995f500b38eb4 (diff)
Move #create_confidentiality_note to Issues::UpdateService
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec')
-rw-r--r--spec/services/issues/update_service_spec.rb4
-rw-r--r--spec/services/system_note_service_spec.rb14
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