Address concerns from #1018 commit c59668e

This commit is contained in:
Benjamin Fleischer
2016-02-08 17:55:15 -06:00
parent c59668e7a8
commit 5b953ff40f
5 changed files with 51 additions and 45 deletions

View File

@@ -65,7 +65,16 @@ module ActiveModel
adapter: :json_api,
links: nil
).serializable_hash
assert_equal(nil, hash[:links])
refute hash.key?(:links), 'No links key to be output'
end
def test_nil_toplevel_links_json_adapter
hash = ActiveModel::SerializableResource.new(
@post,
adapter: :json,
links: nil
).serializable_hash
refute hash.key?(:links), 'No links key to be output'
end
def test_resource_links