Permalink
Browse files

Remove test for XML YAML parsing

The support for YAML parsing in XML has been removed from Active Support
since it introduced an security risk. See a494824 for more detail.
  • Loading branch information...
1 parent 7909e7f commit f2527558857e8fb791eddeb29fb9e4f47ea6360f @sikachu sikachu committed Jan 9, 2013
Showing with 0 additions and 38 deletions.
  1. +0 −24 activeresource/test/cases/base_test.rb
  2. +0 −14 activeresource/test/cases/finder_test.rb
View
24 activeresource/test/cases/base_test.rb
@@ -53,25 +53,11 @@ def setup
:children => [{:name => 'Natacha'}]},
{:name => 'Milena',
:children => []}]}]}.to_xml(:root => 'customer')
- # - resource with yaml array of strings; for ARs using serialize :bar, Array
- @marty = <<-eof.strip
- <?xml version=\"1.0\" encoding=\"UTF-8\"?>
- <person>
- <id type=\"integer\">5</id>
- <name>Marty</name>
- <colors type=\"yaml\">---
- - \"red\"
- - \"green\"
- - \"blue\"
- </colors>
- </person>
- eof
ActiveResource::HttpMock.respond_to do |mock|
mock.get "/people/1.xml", {}, @matz
mock.get "/people/2.xml", {}, @david
mock.get "/people/6.json", {}, @joe
- mock.get "/people/5.xml", {}, @marty
mock.get "/people/Greg.xml", {}, @greg
mock.get "/people/4.xml", {'key' => 'value'}, nil, 404
mock.put "/people/1.xml", {}, nil, 204
@@ -1109,14 +1095,4 @@ def test_parse_deep_nested_resources
end
end
end
-
- def test_load_yaml_array
- assert_nothing_raised do
- marty = Person.find(5)
- assert_equal 3, marty.colors.size
- marty.colors.each do |color|
- assert_kind_of String, color
- end
- end
- end
end
View
14 activeresource/test/cases/finder_test.rb
@@ -50,24 +50,10 @@ def setup
:children => [{:name => 'Natacha'}]},
{:name => 'Milena',
:children => []}]}]}.to_xml(:root => 'customer')
- # - resource with yaml array of strings; for ARs using serialize :bar, Array
- @marty = <<-eof.strip
- <?xml version=\"1.0\" encoding=\"UTF-8\"?>
- <person>
- <id type=\"integer\">5</id>
- <name>Marty</name>
- <colors type=\"yaml\">---
- - \"red\"
- - \"green\"
- - \"blue\"
- </colors>
- </person>
- eof
ActiveResource::HttpMock.respond_to do |mock|
mock.get "/people/1.xml", {}, @matz
mock.get "/people/2.xml", {}, @david
- mock.get "/people/5.xml", {}, @marty
mock.get "/people/Greg.xml", {}, @greg
mock.get "/people/4.xml", {'key' => 'value'}, nil, 404
mock.put "/people/1.xml", {}, nil, 204

0 comments on commit f252755

Please sign in to comment.