summaryrefslogtreecommitdiff
path: root/spec/services/quick_actions
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-18 18:06:14 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-18 18:06:14 +0000
commitb08279013423a66f06f5edde4e067f328fe135bd (patch)
tree47aca1a9b0655cd7861bddf31ec17d4b302fc4ea /spec/services/quick_actions
parent4584eb0e07d372d6014de16ab359965475184c99 (diff)
downloadgitlab-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.rb16
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