diff options
Diffstat (limited to 'spec/services/quick_actions/interpret_service_spec.rb')
-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 |