diff options
Diffstat (limited to 'actionpack/test/controller/api/with_helpers_test.rb')
-rw-r--r-- | actionpack/test/controller/api/with_helpers_test.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/actionpack/test/controller/api/with_helpers_test.rb b/actionpack/test/controller/api/with_helpers_test.rb index 9882a25ae1..06db949153 100644 --- a/actionpack/test/controller/api/with_helpers_test.rb +++ b/actionpack/test/controller/api/with_helpers_test.rb @@ -15,6 +15,12 @@ class WithHelpersController < ActionController::API end end +class SubclassWithHelpersController < WithHelpersController + def with_helpers + render plain: self.class.helpers.my_helper + end +end + class WithHelpersTest < ActionController::TestCase tests WithHelpersController @@ -24,3 +30,13 @@ class WithHelpersTest < ActionController::TestCase assert_equal "helper", response.body end end + +class SubclassWithHelpersTest < ActionController::TestCase + tests WithHelpersController + + def test_with_helpers + get :with_helpers + + assert_equal "helper", response.body + end +end |