diff options
Diffstat (limited to 'actionwebservice/test/abstract_dispatcher.rb')
-rw-r--r-- | actionwebservice/test/abstract_dispatcher.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionwebservice/test/abstract_dispatcher.rb b/actionwebservice/test/abstract_dispatcher.rb index da07d2cf8c..3657f8a5ee 100644 --- a/actionwebservice/test/abstract_dispatcher.rb +++ b/actionwebservice/test/abstract_dispatcher.rb @@ -40,6 +40,7 @@ module DispatcherTest class DirectAPI < ActionWebService::API::Base api_method :add, :expects => [{:a=>:int}, {:b=>:int}], :returns => [:int] + api_method :add2, :expects => [{:a=>:int}, {:b=>:int}], :returns => [:int] api_method :before_filtered api_method :after_filtered, :returns => [[:int]] api_method :struct_return, :returns => [[Node]] @@ -141,6 +142,7 @@ module DispatcherTest after_filter :alwaysok, :only => [:after_filtered] attr :added + attr :added2 attr :before_filter_called attr :before_filter_target_called attr :after_filter_called @@ -159,6 +161,10 @@ module DispatcherTest @added = @params['a'] + @params['b'] end + def add2(a, b) + @added2 = a + b + end + def before_filtered @before_filter_target_called = true end @@ -212,6 +218,8 @@ module DispatcherCommonTests def test_direct_dispatching assert_equal(70, do_method_call(@direct_controller, 'Add', 20, 50)) assert_equal(70, @direct_controller.added) + assert_equal(50, do_method_call(@direct_controller, 'Add2', 25, 25)) + assert_equal(50, @direct_controller.added2) assert(@direct_controller.void_called == false) case @encoder when WS::Encoding::SoapRpcEncoding |