diff options
Diffstat (limited to 'actionpack/test/template/test_case_test.rb')
-rw-r--r-- | actionpack/test/template/test_case_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/template/test_case_test.rb b/actionpack/test/template/test_case_test.rb index c8441b6894..acd002ce73 100644 --- a/actionpack/test/template/test_case_test.rb +++ b/actionpack/test/template/test_case_test.rb @@ -338,6 +338,18 @@ module ActionView assert_match "i_was_never_rendered to be rendered but it was not.", e.message assert_match 'Expected ["/test/partial"] to include "i_was_never_rendered"', e.message end + + test 'specifying locals works when the partial is inside a directory with underline prefix' do + controller.controller_path = "test" + render(template: 'test/render_partial_inside_directory') + assert_template partial: 'test/_directory/_partial_with_locales', locals: { 'name' => 'Jane' } + end + + test 'specifying locals works when the partial is inside a directory without underline prefix' do + controller.controller_path = "test" + render(template: 'test/render_partial_inside_directory') + assert_template partial: 'test/_directory/partial_with_locales', locals: { 'name' => 'Jane' } + end end module AHelperWithInitialize |