aboutsummaryrefslogtreecommitdiffstats
path: root/actionwebservice/test
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-04-06 02:52:01 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-04-06 02:52:01 +0000
commitf2790d03905c275e8eff3927429bdb77f6c75d3a (patch)
treeaff4c64f458c444be487736144fcf18ec1dcdd71 /actionwebservice/test
parenta86e594997a333e343936ca18c0f294058aeb083 (diff)
downloadrails-f2790d03905c275e8eff3927429bdb77f6c75d3a.tar.gz
rails-f2790d03905c275e8eff3927429bdb77f6c75d3a.tar.bz2
rails-f2790d03905c275e8eff3927429bdb77f6c75d3a.zip
invoke / invoke_delegated / invoke_layered check for correct number of args (closes #4610) [jerrett@bravenet.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4173 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/test')
-rw-r--r--actionwebservice/test/test_invoke_test.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/actionwebservice/test/test_invoke_test.rb b/actionwebservice/test/test_invoke_test.rb
index 611a0ac215..46f9ddb2d2 100644
--- a/actionwebservice/test/test_invoke_test.rb
+++ b/actionwebservice/test/test_invoke_test.rb
@@ -76,4 +76,25 @@ class TestInvokeTest < Test::Unit::TestCase
end
end
end
+
+ def test_layered_fail_with_wrong_number_of_arguments
+ [:soap, :xmlrpc].each do |protocol|
+ @protocol = protocol
+ [:one, :two].each do |service|
+ @controller = TestInvokeLayeredController.new
+ assert_raise(ArgumentError) { invoke_layered service, :add, 1 }
+ end
+ end
+ end
+
+ def test_delegated_fail_with_wrong_number_of_arguments
+ @controller = TestInvokeDelegatedController.new
+ assert_raise(ArgumentError) { invoke_delegated :service, :add, 1 }
+ end
+
+ def test_direct_fail_with_wrong_number_of_arguments
+ @controller = TestInvokeDirectController.new
+ assert_raise(ArgumentError) { invoke :add, 1 }
+ end
+
end