aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-01-08 20:26:04 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-01-08 20:27:48 -0200
commitb28d6e2c76987011a4e7d67b91601ca518b05ec1 (patch)
tree96ed3610d0e8b4e792ec95020e1ae16dc2c520ea /actionpack/test/controller
parent21879c560fd1e8b380b9a0d46b481b11968d36ef (diff)
downloadrails-b28d6e2c76987011a4e7d67b91601ca518b05ec1.tar.gz
rails-b28d6e2c76987011a4e7d67b91601ca518b05ec1.tar.bz2
rails-b28d6e2c76987011a4e7d67b91601ca518b05ec1.zip
Remove :yaml related tests and fix other related to parsing empty arrays
All Action Pack tests are green.
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/webservice_test.rb43
1 files changed, 0 insertions, 43 deletions
diff --git a/actionpack/test/controller/webservice_test.rb b/actionpack/test/controller/webservice_test.rb
index 2602540fbe..0480295056 100644
--- a/actionpack/test/controller/webservice_test.rb
+++ b/actionpack/test/controller/webservice_test.rb
@@ -142,19 +142,6 @@ class WebServiceTest < ActionDispatch::IntegrationTest
end
end
- def test_register_and_use_yaml_as_symbol
- with_test_route_set do
- with_params_parsers Mime::YAML => :yaml do
- post "/", {"entry" => "loaded from yaml"}.to_yaml,
- {'CONTENT_TYPE' => 'application/x-yaml'}
-
- assert_equal 'entry', @controller.response.body
- assert @controller.params.has_key?(:entry)
- assert_equal 'loaded from yaml', @controller.params["entry"]
- end
- end
- end
-
def test_register_and_use_xml_simple
with_test_route_set do
with_params_parsers Mime::XML => Proc.new { |data| Hash.from_xml(data)['request'].with_indifferent_access } do
@@ -224,36 +211,6 @@ class WebServiceTest < ActionDispatch::IntegrationTest
end
end
- def test_typecast_as_yaml
- with_test_route_set do
- with_params_parsers Mime::YAML => :yaml do
- yaml = (<<-YAML).strip
- ---
- data:
- a: 15
- b: false
- c: true
- d: 2005-03-17
- e: 2005-03-17T21:41:07Z
- f: unparsed
- g:
- - 1
- - hello
- - 1974-07-25
- YAML
- post "/", yaml, {'CONTENT_TYPE' => 'application/x-yaml'}
- params = @controller.params
- assert_equal 15, params[:data][:a]
- assert_equal false, params[:data][:b]
- assert_equal true, params[:data][:c]
- assert_equal Date.new(2005,3,17), params[:data][:d]
- assert_equal Time.utc(2005,3,17,21,41,7), params[:data][:e]
- assert_equal "unparsed", params[:data][:f]
- assert_equal [1, "hello", Date.new(1974,7,25)], params[:data][:g]
- end
- end
- end
-
private
def with_params_parsers(parsers = {})
old_session = @integration_session