diff options
author | Leon Breedt <bitserf@gmail.com> | 2005-11-09 05:29:08 +0000 |
---|---|---|
committer | Leon Breedt <bitserf@gmail.com> | 2005-11-09 05:29:08 +0000 |
commit | 98ae24b9676fb4c28d25c13ace8d08ec741aad04 (patch) | |
tree | 4d8f209ea0cd71b02f70b0f5d03f757e2b7816a8 /actionwebservice/test | |
parent | 0abaf3a2d8d35481a5d4ddb9817d9903c8e61200 (diff) | |
download | rails-98ae24b9676fb4c28d25c13ace8d08ec741aad04.tar.gz rails-98ae24b9676fb4c28d25c13ace8d08ec741aad04.tar.bz2 rails-98ae24b9676fb4c28d25c13ace8d08ec741aad04.zip |
Fix that XML-RPC date/time values did not have well-defined behaviour (#2516, #2534). This fix has one caveat, in that we can't support pre-1970 dates from XML-RPC clients.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2945 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/test')
-rw-r--r-- | actionwebservice/test/abstract_dispatcher.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionwebservice/test/abstract_dispatcher.rb b/actionwebservice/test/abstract_dispatcher.rb index 94edb213fa..b857e4a957 100644 --- a/actionwebservice/test/abstract_dispatcher.rb +++ b/actionwebservice/test/abstract_dispatcher.rb @@ -62,6 +62,7 @@ module DispatcherTest api_method :test_utf8, :returns => [:string] api_method :hex, :expects => [:base64], :returns => [:string] api_method :unhex, :expects => [:string], :returns => [:base64] + api_method :time, :expects => [:time], :returns => [:time] end class VirtualAPI < ActionWebService::API::Base @@ -260,6 +261,10 @@ module DispatcherTest return [s].pack("H*") end + def time(t) + t + end + protected def alwaysfail(method_name, params) @before_filter_called = true @@ -295,6 +300,8 @@ module DispatcherCommonTests assert(result[1].is_a?(DispatcherTest::Person)) assert_equal("cafe", do_method_call(@direct_controller, 'Hex', "\xca\xfe")) assert_equal("\xca\xfe", do_method_call(@direct_controller, 'Unhex', "cafe")) + time = Time.gm(1998, "Feb", 02, 15, 12, 01) + assert_equal(time, do_method_call(@direct_controller, 'Time', time)) end def test_direct_entrypoint |