diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-30 18:09:00 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-30 18:09:00 +0300 |
commit | f4199ade274d43b2627d17d9087f42d0f8175369 (patch) | |
tree | f8b2311aeae6d4eeed80ee2db7eb8b06e5f7cba8 /spec/support/matchers | |
parent | e672c333df6dc238e5050ab5eb709d6df5c87380 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/matchers')
-rw-r--r-- | spec/support/matchers/graphql_matchers.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/support/matchers/graphql_matchers.rb b/spec/support/matchers/graphql_matchers.rb index dcaec176687..3ba88c3ae71 100644 --- a/spec/support/matchers/graphql_matchers.rb +++ b/spec/support/matchers/graphql_matchers.rb @@ -7,14 +7,14 @@ RSpec::Matchers.define :require_graphql_authorizations do |*expected| if klass.respond_to?(:required_permissions) klass.required_permissions else - [klass.to_graphql.metadata[:authorize]] + Array.wrap(klass.authorize) end end match do |klass| actual = permissions_for(klass) - expect(actual).to match_array(expected) + expect(actual).to match_array(expected.compact) end failure_message do |klass| @@ -213,16 +213,16 @@ RSpec::Matchers.define :have_graphql_resolver do |expected| match do |field| case expected when Method - expect(field.to_graphql.metadata[:type_class].resolve_proc).to eq(expected) + expect(field.type_class.resolve_proc).to eq(expected) else - expect(field.to_graphql.metadata[:type_class].resolver).to eq(expected) + expect(field.type_class.resolver).to eq(expected) end end end RSpec::Matchers.define :have_graphql_extension do |expected| match do |field| - expect(field.to_graphql.metadata[:type_class].extensions).to include(expected) + expect(field.type_class.extensions).to include(expected) end end |