aboutsummaryrefslogtreecommitdiffstats
path: root/actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb
diff options
context:
space:
mode:
authorLeon Breedt <bitserf@gmail.com>2005-08-16 05:45:03 +0000
committerLeon Breedt <bitserf@gmail.com>2005-08-16 05:45:03 +0000
commit9d79880e81a035c96ca70d7e342549236ed1f242 (patch)
treeb73f49f050a35fd24db52bb591efe9c629ce032b /actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb
parent2eba7134455863f936d0b1e8e88284c08ef6b083 (diff)
downloadrails-9d79880e81a035c96ca70d7e342549236ed1f242.tar.gz
rails-9d79880e81a035c96ca70d7e342549236ed1f242.tar.bz2
rails-9d79880e81a035c96ca70d7e342549236ed1f242.zip
add 'system.multicall' support to XML-RPC. boxcarred methods must still exist
on the target service(s), value casting will still be performed, and recursive 'system.multicall' calls are not allowed. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2021 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb')
-rw-r--r--actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb b/actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb
index be8d553fc9..8309b0e16d 100644
--- a/actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb
+++ b/actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb
@@ -19,6 +19,25 @@ class TC_DispatcherActionControllerXmlRpc < Test::Unit::TestCase
assert_equal(["bloggerCat1", "bloggerCat2"], blogger_cats)
end
+ def test_multicall
+ response = do_method_call(@layered_controller, 'system.multicall', [
+ {'methodName' => 'mt.getCategories'},
+ {'methodName' => 'blogger.getCategories'},
+ {'methodName' => 'mt.bool'},
+ {'methodName' => 'blogger.str', 'params' => ['2000']},
+ {'methodName' => 'mt.alwaysFail'},
+ {'methodName' => 'blogger.alwaysFail'}
+ ])
+ assert_equal [
+ [["mtCat1", "mtCat2"]],
+ [["bloggerCat1", "bloggerCat2"]],
+ [true],
+ ["2500"],
+ {"faultCode" => 3, "faultString" => "MT AlwaysFail"},
+ {"faultCode" => 3, "faultString" => "Blogger AlwaysFail"}
+ ], response
+ end
+
protected
def exception_message(xmlrpc_fault_exception)
xmlrpc_fault_exception.faultString