diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-03 03:19:37 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-03 03:19:37 +0000 |
commit | 3d4965765cd47df7f3f9d3db4cbb117936b1c939 (patch) | |
tree | a7dcd1024112bde8716f09c1e75da22cb640d38f /actionwebservice/test/client_soap_test.rb | |
parent | 94725b02bcc5e623dcbe1d73d57b2ede2c88440e (diff) | |
download | rails-3d4965765cd47df7f3f9d3db4cbb117936b1c939.tar.gz rails-3d4965765cd47df7f3f9d3db4cbb117936b1c939.tar.bz2 rails-3d4965765cd47df7f3f9d3db4cbb117936b1c939.zip |
Fix a ton of issues with AWS (yes, Kent saved it from being unbundled in 1.1) #4038 [Kent Sibilev]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3750 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/test/client_soap_test.rb')
-rw-r--r-- | actionwebservice/test/client_soap_test.rb | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/actionwebservice/test/client_soap_test.rb b/actionwebservice/test/client_soap_test.rb index e118b4956e..ee02d919a4 100644 --- a/actionwebservice/test/client_soap_test.rb +++ b/actionwebservice/test/client_soap_test.rb @@ -49,6 +49,8 @@ end class TC_ClientSoap < Test::Unit::TestCase include ClientTest include ClientSoapTest + + fixtures :users def setup @server = SoapServer.instance @@ -88,6 +90,16 @@ class TC_ClientSoap < Test::Unit::TestCase assert_equal(true, @client.struct_pass([new_person])) assert_equal([[new_person]], @container.value_struct_pass) end + + def test_nil_struct_return + assert_nil @client.nil_struct_return + end + + def test_inner_nil + outer = @client.inner_nil + assert_equal 'outer', outer.name + assert_nil outer.inner + end def test_client_container assert_equal(50, ClientContainer.new.get_client.client_container) @@ -106,4 +118,28 @@ class TC_ClientSoap < Test::Unit::TestCase assert_equal([5, 6], @container.value_normal) @container.value_normal = nil end + + def test_model_return + user = @client.user_return + assert_equal 1, user.id + assert_equal 'Kent', user.name + assert user.active? + assert_kind_of Date, user.created_on + assert_equal Date.today, user.created_on + end + + def test_with_model + with_model = @client.with_model_return + assert_equal 'Kent', with_model.user.name + assert_equal 2, with_model.users.size + with_model.users.each do |user| + assert_kind_of User, user + end + end + + def test_scoped_model_return + scoped_model = @client.scoped_model_return + assert_kind_of Accounting::User, scoped_model + assert_equal 'Kent', scoped_model.name + end end |