mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Assert Schema (#1677)
* Assert Schema * Fix regression from #1695 where JSONAPI renders empty meta * Add changelog
This commit is contained in:
committed by
L. Preston Sego III
parent
9f59398f2b
commit
6c321cd862
@@ -110,7 +110,7 @@ module ActiveModel
|
||||
assert_equal(expected, actual)
|
||||
end
|
||||
|
||||
def test_meta_key_is_present_when_empty_hash_with_json_api
|
||||
def test_meta_key_is_not_present_when_empty_hash_with_json_api
|
||||
actual = ActiveModelSerializers::SerializableResource.new(
|
||||
@blog,
|
||||
adapter: :json_api,
|
||||
@@ -122,8 +122,7 @@ module ActiveModel
|
||||
id: '1',
|
||||
type: 'blogs',
|
||||
attributes: { title: 'AMS Hints' }
|
||||
},
|
||||
meta: {}
|
||||
}
|
||||
}
|
||||
assert_equal(expected, actual)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user