Skip to content

Commit 7e5dd80

Browse files
committed
Update specs for assert_nil
1 parent 21e504c commit 7e5dd80

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

spec/graphql/schema_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class CustomSubscriptions < GraphQL::Subscriptions::ActionCableSubscriptions
4747
extra_types ExtraType
4848
query_analyzer Object.new
4949
multiplex_analyzer Object.new
50+
validate_timeout 100
5051
rescue_from(StandardError) { }
5152
use GraphQL::Backtrace
5253
use GraphQL::Subscriptions::ActionCableSubscriptions, action_cable: nil, action_cable_coder: JSON

spec/integration/rails/graphql/query/variables_spec.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,11 @@ class << self
230230

231231
def assert_has_key_with_value(hash, key, has_key, value)
232232
assert_equal(has_key, hash.key?(key))
233-
assert_equal(value, hash[key])
233+
if value.nil?
234+
assert_nil hash[key]
235+
else
236+
assert_equal(value, hash[key])
237+
end
234238
end
235239

236240
it "preserves explicit null" do

0 commit comments

Comments
 (0)