diff options
Diffstat (limited to 'spec/support/matchers/graphql_matchers.rb')
-rw-r--r-- | spec/support/matchers/graphql_matchers.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/support/matchers/graphql_matchers.rb b/spec/support/matchers/graphql_matchers.rb index e151a934591..31b0290bb15 100644 --- a/spec/support/matchers/graphql_matchers.rb +++ b/spec/support/matchers/graphql_matchers.rb @@ -108,6 +108,12 @@ RSpec::Matchers.define :have_graphql_resolver do |expected| end end +RSpec::Matchers.define :have_graphql_extension do |expected| + match do |field| + expect(field.metadata[:type_class].extensions).to include(expected) + end +end + RSpec::Matchers.define :expose_permissions_using do |expected| match do |type| permission_field = type.fields['userPermissions'] |