diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-07-24 13:33:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-24 13:33:17 -0400 |
commit | 6f0729b604dca46d4198f74a08eb836b2e8b5492 (patch) | |
tree | ef4cf794d97004099d51a0fca92f274686a10904 /actionview/test | |
parent | dd58cc2ebb9cc0f4f4db50a1a6d3296ad9a6a8e2 (diff) | |
parent | 3cb7fe590f2b3cf29c2a32504fb4d24a79559a0b (diff) | |
download | rails-6f0729b604dca46d4198f74a08eb836b2e8b5492.tar.gz rails-6f0729b604dca46d4198f74a08eb836b2e8b5492.tar.bz2 rails-6f0729b604dca46d4198f74a08eb836b2e8b5492.zip |
Merge pull request #29792 from lugray/delegate_respond_to
Delegate respond_to? in ActionView::Helpers::ControllerHelper
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/template/controller_helper_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/actionview/test/template/controller_helper_test.rb b/actionview/test/template/controller_helper_test.rb index 8dd0cedb75..ea0e790d9b 100644 --- a/actionview/test/template/controller_helper_test.rb +++ b/actionview/test/template/controller_helper_test.rb @@ -18,4 +18,15 @@ class ControllerHelperTest < ActionView::TestCase assert_nil default_form_builder end + + def test_respond_to + @controller = OpenStruct.new + assign_controller(@controller) + assert_not respond_to?(:params) + assert respond_to?(:assign_controller) + + @controller.params = {} + assert respond_to?(:params) + assert respond_to?(:assign_controller) + end end |