Assert Schema (#1677)

* Assert Schema

* Fix regression from #1695 where JSONAPI renders empty meta

* Add changelog
This commit is contained in:
Benjamin Fleischer
2016-05-17 12:22:38 -05:00
committed by L. Preston Sego III
parent 9f59398f2b
commit 6c321cd862
4 changed files with 45 additions and 10 deletions

View File

@@ -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