Permalink
Browse files

Added test for nested data attributes

  • Loading branch information...
1 parent 25eb60d commit 21312fe8e797cf54b2a879d67337c8ef4971f57a @agios agios committed Mar 7, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 padrino-helpers/test/test_tag_helpers.rb
@@ -17,6 +17,11 @@ def app
assert_has_tag(:a, 'data-remote' => 'true', 'data-method' => 'post') { actual_html }
end
+ should "support nested data attributes" do
+ actual_html = tag(:div, {:dojo => {:type => 'dijit.form.TextBox', :props => 'readOnly: true'}})
+ assert_has_tag(:div, 'data-dojo-type' => 'dijit.form.TextBox', 'data-dojo-props' => 'readOnly: true') { actual_html }
+ end
+
should "escape html" do
actual_html = tag(:br, :class => 'Example "bar"')
assert_equal "<br class=\"Example &quot;bar&quot;\">", actual_html

0 comments on commit 21312fe

Please sign in to comment.