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 d735c10f698..ebba5d8a73c 100644 --- a/spec/support/matchers/graphql_matchers.rb +++ b/spec/support/matchers/graphql_matchers.rb @@ -64,6 +64,12 @@ RSpec::Matchers.define :have_graphql_type do |expected| end end +RSpec::Matchers.define :have_non_null_graphql_type do |expected| + match do |field| + expect(field.type).to eq(!expected.to_graphql) + end +end + RSpec::Matchers.define :have_graphql_resolver do |expected| match do |field| case expected |