diff options
Diffstat (limited to 'spec/support/matchers/graphql_matchers.rb')
-rw-r--r-- | spec/support/matchers/graphql_matchers.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/support/matchers/graphql_matchers.rb b/spec/support/matchers/graphql_matchers.rb index db7d4269945..155a6dba52c 100644 --- a/spec/support/matchers/graphql_matchers.rb +++ b/spec/support/matchers/graphql_matchers.rb @@ -169,7 +169,11 @@ RSpec::Matchers.define :have_graphql_type do |expected, opts = {}| include GraphQLTypeHelpers match do |object| - expect(object.type).to eq(nullified(expected, opts[:null])) + if object.type.list? + expect(object.type.unwrap).to eq(nullified(expected, opts[:null])) + else + expect(object.type).to eq(nullified(expected, opts[:null])) + end end failure_message do |object| |