summaryrefslogtreecommitdiff
path: root/spec/graphql/resolvers/group_labels_resolver_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/graphql/resolvers/group_labels_resolver_spec.rb')
-rw-r--r--spec/graphql/resolvers/group_labels_resolver_spec.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/graphql/resolvers/group_labels_resolver_spec.rb b/spec/graphql/resolvers/group_labels_resolver_spec.rb
index 3f4ad8760c0..2031e534703 100644
--- a/spec/graphql/resolvers/group_labels_resolver_spec.rb
+++ b/spec/graphql/resolvers/group_labels_resolver_spec.rb
@@ -27,8 +27,10 @@ RSpec.describe Resolvers::GroupLabelsResolver do
describe '#resolve' do
context 'with unauthorized user' do
- it 'raises error' do
- expect { resolve_labels(subgroup) }.to raise_error(Gitlab::Graphql::Errors::ResourceNotAvailable)
+ it 'generates an error' do
+ expect_graphql_error_to_be_created(Gitlab::Graphql::Errors::ResourceNotAvailable) do
+ resolve_labels(subgroup)
+ end
end
end