diff options
Diffstat (limited to 'spec/graphql/mutations/saved_replies/destroy_spec.rb')
-rw-r--r-- | spec/graphql/mutations/saved_replies/destroy_spec.rb | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/spec/graphql/mutations/saved_replies/destroy_spec.rb b/spec/graphql/mutations/saved_replies/destroy_spec.rb index 6cff28ec0b2..84efd9ee0b8 100644 --- a/spec/graphql/mutations/saved_replies/destroy_spec.rb +++ b/spec/graphql/mutations/saved_replies/destroy_spec.rb @@ -13,34 +13,18 @@ RSpec.describe Mutations::SavedReplies::Destroy do mutation.resolve(id: saved_reply.to_global_id) end - context 'when feature is disabled' do + context 'when service fails to delete a new saved reply' do before do - stub_feature_flags(saved_replies: false) + saved_reply.destroy! end it 'raises Gitlab::Graphql::Errors::ResourceNotAvailable' do - expect { subject }.to raise_error(Gitlab::Graphql::Errors::ResourceNotAvailable, 'Feature disabled') + expect { subject }.to raise_error(Gitlab::Graphql::Errors::ResourceNotAvailable) end end - context 'when feature is enabled for current user' do - before do - stub_feature_flags(saved_replies: current_user) - end - - context 'when service fails to delete a new saved reply' do - before do - saved_reply.destroy! - end - - it 'raises Gitlab::Graphql::Errors::ResourceNotAvailable' do - expect { subject }.to raise_error(Gitlab::Graphql::Errors::ResourceNotAvailable) - end - end - - context 'when service successfully deletes the saved reply' do - it { expect(subject[:errors]).to be_empty } - end + context 'when service successfully deletes the saved reply' do + it { expect(subject[:errors]).to be_empty } end end end |