diff options
author | Leon Breedt <bitserf@gmail.com> | 2005-05-08 19:58:15 +0000 |
---|---|---|
committer | Leon Breedt <bitserf@gmail.com> | 2005-05-08 19:58:15 +0000 |
commit | 979880dd24d74cd2e99a06eab6c9969a1b5b2ceb (patch) | |
tree | dfa8231228801bbf625c470f25cac3261706c19f /actionwebservice | |
parent | 190eaf93078d2fae54b0f88a3325f2965b560fe3 (diff) | |
download | rails-979880dd24d74cd2e99a06eab6c9969a1b5b2ceb.tar.gz rails-979880dd24d74cd2e99a06eab6c9969a1b5b2ceb.tar.bz2 rails-979880dd24d74cd2e99a06eab6c9969a1b5b2ceb.zip |
add test to ensure the bug fixed by [1295] can't occur again.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1296 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice')
-rw-r--r-- | actionwebservice/CHANGELOG | 2 | ||||
-rw-r--r-- | actionwebservice/test/test_invoke_test.rb | 20 |
2 files changed, 13 insertions, 9 deletions
diff --git a/actionwebservice/CHANGELOG b/actionwebservice/CHANGELOG index da5d32bcc8..7417e22bdf 100644 --- a/actionwebservice/CHANGELOG +++ b/actionwebservice/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fix that functional testing of :layered controllers failed when using the SOAP protocol + * Allow invocation filters in :direct controllers as well, as they have access to more information regarding the web service request than ActionPack filters * Add support for a :base64 signature type #1272 [Shugo Maeda] diff --git a/actionwebservice/test/test_invoke_test.rb b/actionwebservice/test/test_invoke_test.rb index fb992472f4..611a0ac215 100644 --- a/actionwebservice/test/test_invoke_test.rb +++ b/actionwebservice/test/test_invoke_test.rb @@ -38,8 +38,8 @@ end class TestInvokeLayeredController < TestController web_service_dispatching_mode :layered - web_service :one, TestInvokeService.new - web_service :two, TestInvokeService.new + web_service(:one) { @service_one ||= TestInvokeService.new } + web_service(:two) { @service_two ||= TestInvokeService.new } end class TestInvokeTest < Test::Unit::TestCase @@ -65,13 +65,15 @@ class TestInvokeTest < Test::Unit::TestCase end def test_layered_add - @protocol = ActionWebService::Protocol::XmlRpc::XmlRpcProtocol.new - @controller = TestInvokeLayeredController.new - [:one, :two].each do |service| - assert_equal nil, @controller.web_service_object(service).invoked - result = invoke_layered service, :add, 200, -50 - assert_equal 150, result - assert_equal true, @controller.web_service_object(service).invoked + [:soap, :xmlrpc].each do |protocol| + @protocol = protocol + [:one, :two].each do |service| + @controller = TestInvokeLayeredController.new + assert_equal nil, @controller.web_service_object(service).invoked + result = invoke_layered service, :add, 200, -50 + assert_equal 150, result + assert_equal true, @controller.web_service_object(service).invoked + end end end end |