aboutsummaryrefslogtreecommitdiffstats
path: root/actionwebservice/test/client_xmlrpc_test.rb
diff options
context:
space:
mode:
authorLeon Breedt <bitserf@gmail.com>2005-03-28 03:20:13 +0000
committerLeon Breedt <bitserf@gmail.com>2005-03-28 03:20:13 +0000
commit594063f23cf8e7cecd24329e801992784f420b55 (patch)
treed52e9a6fc0521d51fcc3875162adf0411ee6caa0 /actionwebservice/test/client_xmlrpc_test.rb
parent439a216dcb65ac83d86ca04bb898e1797a87ce70 (diff)
downloadrails-594063f23cf8e7cecd24329e801992784f420b55.tar.gz
rails-594063f23cf8e7cecd24329e801992784f420b55.tar.bz2
rails-594063f23cf8e7cecd24329e801992784f420b55.zip
generalize casting code to be used by both SOAP and XML-RPC (previously only XML-RPC). switch
to better model for API methods, and improve the ability to generate protocol requests/response, will be required by upcoming scaffolding. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1030 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/test/client_xmlrpc_test.rb')
-rw-r--r--actionwebservice/test/client_xmlrpc_test.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/actionwebservice/test/client_xmlrpc_test.rb b/actionwebservice/test/client_xmlrpc_test.rb
index 53b6de51e1..3301113d95 100644
--- a/actionwebservice/test/client_xmlrpc_test.rb
+++ b/actionwebservice/test/client_xmlrpc_test.rb
@@ -60,6 +60,11 @@ class TC_ClientXmlRpc < Test::Unit::TestCase
assert(@container.value_normal.nil?)
assert_equal(5, @client.normal(5, 6))
assert_equal([5, 6], @container.value_normal)
+ assert_equal(5, @client.normal("7", "8"))
+ assert_equal([7, 8], @container.value_normal)
+ assert_raises(TypeError) do
+ assert_equal(5, @client.normal(true, false))
+ end
end
def test_array_return
@@ -86,7 +91,7 @@ class TC_ClientXmlRpc < Test::Unit::TestCase
def test_named_parameters
assert(@container.value_named_parameters.nil?)
- assert_equal(true, @client.named_parameters("xxx", 7))
+ assert_equal(nil, @client.named_parameters("xxx", 7))
assert_equal(["xxx", 7], @container.value_named_parameters)
end
@@ -97,7 +102,7 @@ class TC_ClientXmlRpc < Test::Unit::TestCase
end
def test_invalid_signature
- assert_raises(ActionWebService::Client::ClientError) do
+ assert_raises(ArgumentError) do
@client.normal
end
end