aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-07-01 07:42:04 -0700
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-07-01 07:42:04 -0700
commit6c82844fceb777f4ffb74fce3a12abe679136452 (patch)
tree179f45e6125d1368671a347e664d786eda7abe78 /activemodel
parentb7a43ddd39196475cae7510f654eda8487fc1dc6 (diff)
parent404a61e19c54ecb681ffb9152cd3c873121948fe (diff)
downloadrails-6c82844fceb777f4ffb74fce3a12abe679136452.tar.gz
rails-6c82844fceb777f4ffb74fce3a12abe679136452.tar.bz2
rails-6c82844fceb777f4ffb74fce3a12abe679136452.zip
Merge pull request #11207 from vipulnsward/remove_escapes
Remove redundant escapes from xml serialization test
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/test/cases/serializers/xml_serialization_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/activemodel/test/cases/serializers/xml_serialization_test.rb b/activemodel/test/cases/serializers/xml_serialization_test.rb
index 901f42f29b..c4cfb0c255 100644
--- a/activemodel/test/cases/serializers/xml_serialization_test.rb
+++ b/activemodel/test/cases/serializers/xml_serialization_test.rb
@@ -130,7 +130,7 @@ class XmlSerializationTest < ActiveModel::TestCase
end
test "should serialize nil" do
- assert_match %r{<pseudonyms nil=\"true\"/>}, @contact.to_xml(methods: :pseudonyms)
+ assert_match %r{<pseudonyms nil="true"/>}, @contact.to_xml(methods: :pseudonyms)
end
test "should serialize integer" do
@@ -138,23 +138,23 @@ class XmlSerializationTest < ActiveModel::TestCase
end
test "should serialize datetime" do
- assert_match %r{<created-at type=\"dateTime\">2006-08-01T00:00:00Z</created-at>}, @contact.to_xml
+ assert_match %r{<created-at type="dateTime">2006-08-01T00:00:00Z</created-at>}, @contact.to_xml
end
test "should serialize boolean" do
- assert_match %r{<awesome type=\"boolean\">false</awesome>}, @contact.to_xml
+ assert_match %r{<awesome type="boolean">false</awesome>}, @contact.to_xml
end
test "should serialize array" do
- assert_match %r{<social type=\"array\">\s*<social>twitter</social>\s*<social>github</social>\s*</social>}, @contact.to_xml(methods: :social)
+ assert_match %r{<social type="array">\s*<social>twitter</social>\s*<social>github</social>\s*</social>}, @contact.to_xml(methods: :social)
end
test "should serialize hash" do
- assert_match %r{<network>\s*<git type=\"symbol\">github</git>\s*</network>}, @contact.to_xml(methods: :network)
+ assert_match %r{<network>\s*<git type="symbol">github</git>\s*</network>}, @contact.to_xml(methods: :network)
end
test "should serialize yaml" do
- assert_match %r{<preferences type=\"yaml\">--- !ruby/struct:Customer(\s*)\nname: John\n</preferences>}, @contact.to_xml
+ assert_match %r{<preferences type="yaml">--- !ruby/struct:Customer(\s*)\nname: John\n</preferences>}, @contact.to_xml
end
test "should call proc on object" do