mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Fix MT6 assert_nil warnings
This commit is contained in:
@@ -159,7 +159,12 @@ module ActiveModel
|
||||
|
||||
def assert_relationship(relationship_name, expected, opts = {})
|
||||
hash = result(opts)
|
||||
assert_equal(expected, hash[:data][:relationships][relationship_name])
|
||||
actual = hash[:data][:relationships][relationship_name]
|
||||
if expected.nil?
|
||||
assert_nil(actual)
|
||||
else
|
||||
assert_equal(expected, actual)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user