From 7f32666924493fb21a72ad56fb2cf4091aad4141 Mon Sep 17 00:00:00 2001 From: Leon Breedt Date: Sat, 16 Apr 2005 19:29:42 +0000 Subject: Remove a cause of casting failure for XML-RPC by ignoring structure members not defined in the target type, and perform more sanity checks to make more obvious what the resolution should be when neglecting to provide a valid signature or failing to attach an API to a service implementation class. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1171 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionwebservice/test/abstract_dispatcher.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'actionwebservice/test') diff --git a/actionwebservice/test/abstract_dispatcher.rb b/actionwebservice/test/abstract_dispatcher.rb index c3d256d71a..0fe7525c48 100644 --- a/actionwebservice/test/abstract_dispatcher.rb +++ b/actionwebservice/test/abstract_dispatcher.rb @@ -344,6 +344,15 @@ module DispatcherCommonTests assert !person.equal?(@direct_controller.struct_pass_value) end assert_equal person, do_method_call(@direct_controller, 'HashStructReturn')[0] + result = do_method_call(@direct_controller, 'StructPass', {'id' => '1', 'name' => 'test', 'nonexistent_attribute' => 'value'}) + case @protocol + when ActionWebService::Protocol::Soap::SoapProtocol + assert_equal(person, @direct_controller.struct_pass_value) + assert !person.equal?(@direct_controller.struct_pass_value) + when ActionWebService::Protocol::XmlRpc::XmlRpcProtocol + assert_equal(person, @direct_controller.struct_pass_value) + assert !person.equal?(@direct_controller.struct_pass_value) + end end def test_logging -- cgit v1.2.3