mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix broken capture test
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1665 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
fcdcd9b9fa
commit
6e7e552b03
2 changed files with 5 additions and 5 deletions
|
@ -31,8 +31,8 @@ class CaptureTest < Test::Unit::TestCase
|
|||
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
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<% 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 %>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in a new issue