diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-06 11:50:41 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-06 11:50:41 +0000 |
commit | dfac1cea3d851000116a23ab14c2b1ae981f7a12 (patch) | |
tree | 91abe3727d19f4c13affe1a2e4bc4637b35d5fdf /actionpack/test/template/tag_helper_test.rb | |
parent | db41d2dd5c738ca44a07330cf02e9d817fedc34c (diff) | |
download | rails-dfac1cea3d851000116a23ab14c2b1ae981f7a12.tar.gz rails-dfac1cea3d851000116a23ab14c2b1ae981f7a12.tar.bz2 rails-dfac1cea3d851000116a23ab14c2b1ae981f7a12.zip |
Fixed that form helpers would treat string and symbol keys differently in html_options (and possibly create duplicate entries) #112 [bitsweat]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@833 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template/tag_helper_test.rb')
-rw-r--r-- | actionpack/test/template/tag_helper_test.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/actionpack/test/template/tag_helper_test.rb b/actionpack/test/template/tag_helper_test.rb index 2db1bac238..9d8d2644e8 100644 --- a/actionpack/test/template/tag_helper_test.rb +++ b/actionpack/test/template/tag_helper_test.rb @@ -8,23 +8,26 @@ class TagHelperTest < Test::Unit::TestCase def test_tag assert_equal "<p class=\"show\" />", tag("p", "class" => "show") + assert_equal tag("p", "class" => "show"), tag("p", :class => "show") end - + def test_content_tag assert_equal "<a href=\"create\">Create</a>", content_tag("a", "Create", "href" => "create") + assert_equal content_tag("a", "Create", "href" => "create"), + content_tag("a", "Create", :href => "create") end def test_mail_to_with_javascript - assert_equal "<script type=\"text/javascript\" language=\"javascript\">eval(unescape('%64%6f%63%75%6d%65%6e%74%2e%77%72%69%74%65%28%27%3c%61%20%68%72%65%66%3d%22%6d%61%69%6c%74%6f%3a%6d%65%40%64%6f%6d%61%69%6e%2e%63%6f%6d%22%3e%4d%79%20%65%6d%61%69%6c%3c%2f%61%3e%27%29%3b'))</script>", mail_to("me@domain.com", "My email", :encode => "javascript") + assert_equal "<script type=\"text/javascript\" language=\"javascript\">eval(unescape('%64%6f%63%75%6d%65%6e%74%2e%77%72%69%74%65%28%27%3c%61%20%68%72%65%66%3d%22%6d%61%69%6c%74%6f%3a%6d%65%40%64%6f%6d%61%69%6e%2e%63%6f%6d%22%3e%4d%79%20%65%6d%61%69%6c%3c%2f%61%3e%27%29%3b'))</script>", mail_to("me@domain.com", "My email", :encode => "javascript") end def test_mail_to_with_hex - assert_equal "<a href=\"mailto:%6d%65@%64%6f%6d%61%69%6e.%63%6f%6d\">My email</a>", mail_to("me@domain.com", "My email", :encode => "hex") + assert_equal "<a href=\"mailto:%6d%65@%64%6f%6d%61%69%6e.%63%6f%6d\">My email</a>", mail_to("me@domain.com", "My email", :encode => "hex") end def test_mail_to - assert_equal "<a href=\"mailto:me@domain.com\">My email</a>", mail_to("me@domain.com", "My email") + assert_equal "<a href=\"mailto:me@domain.com\">My email</a>", mail_to("me@domain.com", "My email") end # FIXME: Test form tag -end
\ No newline at end of file +end |