diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-18 18:06:14 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-18 18:06:14 +0000 |
commit | b08279013423a66f06f5edde4e067f328fe135bd (patch) | |
tree | 47aca1a9b0655cd7861bddf31ec17d4b302fc4ea /spec/services/quick_actions | |
parent | 4584eb0e07d372d6014de16ab359965475184c99 (diff) | |
download | gitlab-ce-b08279013423a66f06f5edde4e067f328fe135bd.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/quick_actions')
-rw-r--r-- | spec/services/quick_actions/interpret_service_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/services/quick_actions/interpret_service_spec.rb b/spec/services/quick_actions/interpret_service_spec.rb index b65ee16c189..ec68e1a8cf9 100644 --- a/spec/services/quick_actions/interpret_service_spec.rb +++ b/spec/services/quick_actions/interpret_service_spec.rb @@ -586,6 +586,22 @@ describe QuickActions::InterpretService do expect(message).to eq('Made this issue confidential.') end + + context 'when issuable is already confidential' do + before do + issuable.update(confidential: true) + end + + it 'does not return the success message' do + _, _, message = service.execute(content, issuable) + + expect(message).to be_empty + end + + it 'is not part of the available commands' do + expect(service.available_commands(issuable)).not_to include(a_hash_including(name: :confidential)) + end + end end shared_examples 'shrug command' do |