aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/tag_helper_test.rb
diff options
context:
space:
mode:
authorHongli Lai (Phusion) <hongli@phusion.nl>2008-11-13 21:49:23 +0100
committerMichael Koziarski <michael@koziarski.com>2008-11-13 21:55:58 +0100
commit4e9abdd7f1b4e05f8d1b50ddaa080b3ff63b92d9 (patch)
treeda8f41b6b511a4fdf04d1d25ee0e94ec7cd19475 /actionpack/test/template/tag_helper_test.rb
parent4c0921024471c0463d67f8b8fb6a115a94d343aa (diff)
downloadrails-4e9abdd7f1b4e05f8d1b50ddaa080b3ff63b92d9.tar.gz
rails-4e9abdd7f1b4e05f8d1b50ddaa080b3ff63b92d9.tar.bz2
rails-4e9abdd7f1b4e05f8d1b50ddaa080b3ff63b92d9.zip
Tag helper should output an attribute with the value 'false' instead of omitting the attribute, if the associated option is false but not nil.
Diffstat (limited to 'actionpack/test/template/tag_helper_test.rb')
-rw-r--r--actionpack/test/template/tag_helper_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/template/tag_helper_test.rb b/actionpack/test/template/tag_helper_test.rb
index fc49d340ef..ef88cae5b8 100644
--- a/actionpack/test/template/tag_helper_test.rb
+++ b/actionpack/test/template/tag_helper_test.rb
@@ -19,6 +19,10 @@ class TagHelperTest < ActionView::TestCase
assert_equal "<p />", tag("p", :ignored => nil)
end
+ def test_tag_options_accepts_false_option
+ assert_equal "<p value=\"false\" />", tag("p", :value => false)
+ end
+
def test_tag_options_accepts_blank_option
assert_equal "<p included=\"\" />", tag("p", :included => '')
end