diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2010-06-24 17:36:54 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-25 09:49:29 +0200 |
commit | b01df28413be0add0876de6406be9c02d4b96f4c (patch) | |
tree | 53822d96e29104606bfe7edf4b177f1cbe8e357e /actionpack/test/template | |
parent | 617e94658ddc3f71c42fc4f8c2346f87ff106bbe (diff) | |
download | rails-b01df28413be0add0876de6406be9c02d4b96f4c.tar.gz rails-b01df28413be0add0876de6406be9c02d4b96f4c.tar.bz2 rails-b01df28413be0add0876de6406be9c02d4b96f4c.zip |
Do not wrap hidden fields with error proc [#4962 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/active_model_helper_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/template/active_model_helper_test.rb b/actionpack/test/template/active_model_helper_test.rb index b1705072c2..6ab244d178 100644 --- a/actionpack/test/template/active_model_helper_test.rb +++ b/actionpack/test/template/active_model_helper_test.rb @@ -39,6 +39,13 @@ class ActiveModelHelperTest < ActionView::TestCase ) end + def test_hidden_field_does_not_render_errors + assert_dom_equal( + %(<input id="post_author_name" name="post[author_name]" type="hidden" value="" />), + hidden_field("post", "author_name") + ) + end + def test_field_error_proc old_proc = ActionView::Base.field_error_proc ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| |