test/serializers/json_serializer_test.rb in purzelrakete-restful-0.2.6 vs test/serializers/json_serializer_test.rb in purzelrakete-restful-0.2.7
- old
+ new
@@ -67,6 +67,11 @@
pets = PaginatedCollection.new(@person.pets)
pets.total_entries = 1001
json_should_eql_fixture(pets.to_restful_json, "pets", :pets_array_with_total_entries)
end
+
+ specify "should be able to serialize a map" do
+ Person.restful_publish(:name)
+ json_should_eql_fixture({ "total_hits" => 10, "a_person" => @person }.to_restful_json, "people", :hash_with_person)
+ end
end