Use serializer name as root when root not set

This commit is contained in:
Santiago Pastorino
2013-09-14 22:04:41 -03:00
parent 626a85bc3e
commit 6f3503c965
6 changed files with 14 additions and 20 deletions

View File

@@ -21,7 +21,7 @@ module ActiveModel
def test_attributes_serialization_using_as_json
assert_equal({
'name' => 'Name 1', 'description' => 'Description 1'
'profile' => { 'name' => 'Name 1', 'description' => 'Description 1' }
}, @profile_serializer.as_json)
end
end