aboutsummaryrefslogtreecommitdiffstats
path: root/actionwebservice/test/casting_test.rb
diff options
context:
space:
mode:
authorLeon Breedt <bitserf@gmail.com>2005-05-07 22:57:08 +0000
committerLeon Breedt <bitserf@gmail.com>2005-05-07 22:57:08 +0000
commit47a7084b94b8cd0dfc43e0b8f1775eef31c5170d (patch)
treede59c26718ad183b86693f3d45f50380b6510879 /actionwebservice/test/casting_test.rb
parent8a41ea4588f87e963a467305a6757381b6387ca5 (diff)
downloadrails-47a7084b94b8cd0dfc43e0b8f1775eef31c5170d.tar.gz
rails-47a7084b94b8cd0dfc43e0b8f1775eef31c5170d.tar.bz2
rails-47a7084b94b8cd0dfc43e0b8f1775eef31c5170d.zip
add base64 signature type (thanks, Shugo Maeda!)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1293 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/test/casting_test.rb')
-rw-r--r--actionwebservice/test/casting_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionwebservice/test/casting_test.rb b/actionwebservice/test/casting_test.rb
index aa8941da17..34bad07d5b 100644
--- a/actionwebservice/test/casting_test.rb
+++ b/actionwebservice/test/casting_test.rb
@@ -4,6 +4,7 @@ module CastingTest
class API < ActionWebService::API::Base
api_method :int, :expects => [:int]
api_method :str, :expects => [:string]
+ api_method :base64, :expects => [:base64]
api_method :bool, :expects => [:bool]
api_method :float, :expects => [:float]
api_method :time, :expects => [:time]
@@ -22,6 +23,9 @@ class TC_Casting < Test::Unit::TestCase
def test_base_type_casting_valid
assert_equal 10000, cast_expects(:int, '10000')[0]
assert_equal '10000', cast_expects(:str, 10000)[0]
+ base64 = cast_expects(:base64, 10000)[0]
+ assert_equal '10000', base64
+ assert_instance_of ActionWebService::Base64, base64
[1, '1', 'true', 'y', 'yes'].each do |val|
assert_equal true, cast_expects(:bool, val)[0]
end