diff options
Diffstat (limited to 'activerecord/test/xml_serialization_test.rb')
-rw-r--r-- | activerecord/test/xml_serialization_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/xml_serialization_test.rb b/activerecord/test/xml_serialization_test.rb index 8c59d5d26b..824f486d2e 100644 --- a/activerecord/test/xml_serialization_test.rb +++ b/activerecord/test/xml_serialization_test.rb @@ -162,4 +162,12 @@ class DatabaseConnectedXmlSerializationTest < Test::Unit::TestCase assert_match %r{^ <label>.*</label>}, xml assert_no_match %r{^ <label>}, xml end + + def test_should_include_empty_has_many_as_empty_array + authors(:david).posts.delete_all + xml = authors(:david).to_xml :include=>:posts, :indent => 0 + + assert_match %r{<posts type="array"></posts>}, xml + end + end
\ No newline at end of file |