Skip to content

Commit

Permalink
Update specs for assert_nil
Browse files Browse the repository at this point in the history
  • Loading branch information
rmosolgo committed Apr 15, 2024
1 parent 21e504c commit 7e5dd80
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions spec/graphql/schema_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class CustomSubscriptions < GraphQL::Subscriptions::ActionCableSubscriptions
extra_types ExtraType
query_analyzer Object.new
multiplex_analyzer Object.new
validate_timeout 100
rescue_from(StandardError) { }
use GraphQL::Backtrace
use GraphQL::Subscriptions::ActionCableSubscriptions, action_cable: nil, action_cable_coder: JSON
Expand Down
6 changes: 5 additions & 1 deletion spec/integration/rails/graphql/query/variables_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,11 @@ class << self

def assert_has_key_with_value(hash, key, has_key, value)
assert_equal(has_key, hash.key?(key))
assert_equal(value, hash[key])
if value.nil?
assert_nil hash[key]
else
assert_equal(value, hash[key])
end
end

it "preserves explicit null" do
Expand Down

0 comments on commit 7e5dd80

Please sign in to comment.