提交 6e7e552b 编写于 作者: J Jamis Buck

Fix broken capture test


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1665 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 fcdcd9b9
......@@ -31,8 +31,8 @@ def test_simple_capture
def test_update_element_with_capture
get :update_element_with_capture
assert_equal(
"<script type=\"text/javascript\">$('products').innerHTML = '\\n <p>Product 1</p>\\n <p>Product 2</p>\\n'</script>" +
"\n\n$('status').innerHTML = '\\n <b>You bought something!</b>\\n'",
"<script type=\"text/javascript\">$('products').innerHTML = '\\n <p>Product 1</p>\\n <p>Product 2</p>\\n';\n</script>" +
"\n\n$('status').innerHTML = '\\n <b>You bought something!</b>\\n';",
@response.body.strip
)
end
......
<% replacement_function = update_element_function("products", :action => :replace) do %>
<% replacement_function = update_element_function("products", :action => :update) do %>
<p>Product 1</p>
<p>Product 2</p>
<% end %>
<%= javascript_tag(replacement_function) %>
<% update_element_function("status", :action => :replace, :binding => binding) do %>
<% update_element_function("status", :action => :update, :binding => binding) do %>
<b>You bought something!</b>
<% end %>
\ No newline at end of file
<% end %>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册