diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-12-15 20:07:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-15 20:07:12 +0100 |
commit | 4b576f482152411097ecda0c4527bfb01a1d2965 (patch) | |
tree | 0761aebfcd9a470379c810ad3be32fe7800c6cad /actionview/test/template | |
parent | 61075cb79c60ee11fb9050b1a39fa8dcbcd0d71d (diff) | |
parent | 5b217c3a7f294a74d4680e71ef64047432b9ffc2 (diff) | |
download | rails-4b576f482152411097ecda0c4527bfb01a1d2965.tar.gz rails-4b576f482152411097ecda0c4527bfb01a1d2965.tar.bz2 rails-4b576f482152411097ecda0c4527bfb01a1d2965.zip |
Merge pull request #27367 from georgeclaghorn/local-form-with
Avoid invalid attribute on local forms generated by `form_with`
Diffstat (limited to 'actionview/test/template')
-rw-r--r-- | actionview/test/template/form_helper/form_with_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionview/test/template/form_helper/form_with_test.rb b/actionview/test/template/form_helper/form_with_test.rb index 4efc93ca08..c078b47e14 100644 --- a/actionview/test/template/form_helper/form_with_test.rb +++ b/actionview/test/template/form_helper/form_with_test.rb @@ -116,6 +116,16 @@ class FormWithActsLikeFormTagTest < FormWithTest assert_dom_equal expected, output_buffer end + + def test_form_with_with_block_in_erb_and_local_true + output_buffer = render_erb("<%= form_with(url: 'http://www.example.com', local: true) do %>Hello world!<% end %>") + + expected = whole_form("http://www.example.com", local: true) do + "Hello world!" + end + + assert_dom_equal expected, output_buffer + end end class FormWithActsLikeFormForTest < FormWithTest |