aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-10-29 16:18:12 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-10-29 16:18:27 -0700
commit8941831733fc56e2b1872f41c85cc48d782bb984 (patch)
tree5676856877440afe688652530fd5e5f2359b598b /actionpack/test
parent21a386bb0726cce4f4a5d64d55fbb55d8a2b9837 (diff)
downloadrails-8941831733fc56e2b1872f41c85cc48d782bb984.tar.gz
rails-8941831733fc56e2b1872f41c85cc48d782bb984.tar.bz2
rails-8941831733fc56e2b1872f41c85cc48d782bb984.zip
Revert "ActionController::Base#process() now only takes an action name"
This reverts commit 9f93a5efbba3e1cbf0bfa700a17ec8d1ef60d7c6.
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/abstract/callbacks_test.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/actionpack/test/abstract/callbacks_test.rb b/actionpack/test/abstract/callbacks_test.rb
index b47aeaa08f..07571602e4 100644
--- a/actionpack/test/abstract/callbacks_test.rb
+++ b/actionpack/test/abstract/callbacks_test.rb
@@ -246,6 +246,26 @@ module AbstractController
end
end
+ class CallbacksWithArgs < ControllerWithCallbacks
+ set_callback :process_action, :before, :first
+
+ def first
+ @text = "Hello world"
+ end
+
+ def index(text)
+ self.response_body = @text + text
+ end
+ end
+
+ class TestCallbacksWithArgs < ActiveSupport::TestCase
+ test "callbacks still work when invoking process with multiple arguments" do
+ controller = CallbacksWithArgs.new
+ controller.process(:index, " Howdy!")
+ assert_equal "Hello world Howdy!", controller.response_body
+ end
+ end
+
class AliasedCallbacks < ControllerWithCallbacks
ActiveSupport::Deprecation.silence do
before_filter :first