diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
commit | 3cccd102ba543e02725d247893729e5c73b38295 (patch) | |
tree | f36a04ec38517f5deaaacb5acc7d949688d1e187 /spec/services/notes/update_service_spec.rb | |
parent | 205943281328046ef7b4528031b90fbda70c75ac (diff) |
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'spec/services/notes/update_service_spec.rb')
-rw-r--r-- | spec/services/notes/update_service_spec.rb | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/spec/services/notes/update_service_spec.rb b/spec/services/notes/update_service_spec.rb index 71ac1641ca5..ae7bea30944 100644 --- a/spec/services/notes/update_service_spec.rb +++ b/spec/services/notes/update_service_spec.rb @@ -138,45 +138,6 @@ RSpec.describe Notes::UpdateService do end end - context 'setting confidentiality' do - let(:opts) { { confidential: true } } - - context 'simple note' do - it 'updates the confidentiality' do - expect { update_note(opts) }.to change { note.reload.confidential }.from(nil).to(true) - end - end - - context 'discussion notes' do - let(:note) { create(:discussion_note, project: project, noteable: issue, author: user, note: "Old note #{user2.to_reference}") } - let!(:response_note_1) { create(:discussion_note, project: project, noteable: issue, in_reply_to: note) } - let!(:response_note_2) { create(:discussion_note, project: project, noteable: issue, in_reply_to: note, confidential: false) } - let!(:other_note) { create(:note, project: project, noteable: issue) } - - context 'when updating the root note' do - it 'updates the confidentiality of the root note and all the responses' do - update_note(opts) - - expect(note.reload.confidential).to be_truthy - expect(response_note_1.reload.confidential).to be_truthy - expect(response_note_2.reload.confidential).to be_truthy - expect(other_note.reload.confidential).to be_falsey - end - end - - context 'when updating one of the response notes' do - it 'updates only the confidentiality of the note that is being updated' do - Notes::UpdateService.new(project, user, opts).execute(response_note_1) - - expect(note.reload.confidential).to be_falsey - expect(response_note_1.reload.confidential).to be_truthy - expect(response_note_2.reload.confidential).to be_falsey - expect(other_note.reload.confidential).to be_falsey - end - end - end - end - context 'todos' do shared_examples 'does not update todos' do it 'keep todos' do |