提交 ccecea3f 编写于 作者: J Justin

Add test for Rails 3 partial rendoring

上级 e96ababb
......@@ -12,6 +12,7 @@
<% end %>
<div class="field">
<%= raw @product.something %>
<%= f.label :price %><br />
<%= f.text_field :price %>
</div>
......
......@@ -14,7 +14,7 @@ class Rails3Tests < Test::Unit::TestCase
@expected ||= {
:controller => 1,
:model => 5,
:template => 21,
:template => 22,
:warning => 23
}
end
......@@ -502,4 +502,13 @@ class Rails3Tests < Test::Unit::TestCase
:confidence => 1,
:file => /Gemfile/
end
def test_rails3_render_partial
assert_warning :type => :template,
:warning_type => "Cross Site Scripting",
:line => 15,
:message => /^Unescaped model attribute near line 15: Product/,
:confidence => 0,
:file => /_form\.html\.erb/
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册