diff options
Diffstat (limited to 'spec/support/shared_examples/graphql/members_shared_examples.rb')
-rw-r--r-- | spec/support/shared_examples/graphql/members_shared_examples.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/support/shared_examples/graphql/members_shared_examples.rb b/spec/support/shared_examples/graphql/members_shared_examples.rb index b0bdd27a95f..8e9e22f4359 100644 --- a/spec/support/shared_examples/graphql/members_shared_examples.rb +++ b/spec/support/shared_examples/graphql/members_shared_examples.rb @@ -76,8 +76,10 @@ RSpec.shared_examples 'querying members with a group' do resolve(described_class, obj: resource, args: base_args.merge(args), ctx: { current_user: other_user }) end - it 'raises an error' do - expect { subject }.to raise_error(Gitlab::Graphql::Errors::ResourceNotAvailable) + it 'generates an error' do + expect_graphql_error_to_be_created(Gitlab::Graphql::Errors::ResourceNotAvailable) do + subject + end end end end |