aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/prototype_helper_test.rb
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-10-26 05:32:30 +0000
committerRick Olson <technoweenie@gmail.com>2007-10-26 05:32:30 +0000
commitd7aa32d5d04fc98730073523d429d9ce2547316a (patch)
treec5eeb1295ec66078a99f47c98fbc73d7b7b6ef16 /actionpack/test/template/prototype_helper_test.rb
parentd5a93b6241b4df64f9656853d386eca96b6f6baf (diff)
downloadrails-d7aa32d5d04fc98730073523d429d9ce2547316a.tar.gz
rails-d7aa32d5d04fc98730073523d429d9ce2547316a.tar.bz2
rails-d7aa32d5d04fc98730073523d429d9ce2547316a.zip
Update tests for ActiveSupport's JSON escaping change. [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8034 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template/prototype_helper_test.rb')
-rw-r--r--actionpack/test/template/prototype_helper_test.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/actionpack/test/template/prototype_helper_test.rb b/actionpack/test/template/prototype_helper_test.rb
index 3df1502f12..bdb7a848a0 100644
--- a/actionpack/test/template/prototype_helper_test.rb
+++ b/actionpack/test/template/prototype_helper_test.rb
@@ -303,23 +303,23 @@ class JavaScriptGeneratorTest < Test::Unit::TestCase
end
def test_insert_html_with_string
- assert_equal 'new Insertion.Top("element", "\\074p\\076This is a test\\074/p\\076");',
+ assert_equal 'new Insertion.Top("element", "\\074p\\076This is a test\\074\\/p\\076");',
@generator.insert_html(:top, 'element', '<p>This is a test</p>')
- assert_equal 'new Insertion.Bottom("element", "\\074p\076This is a test\\074/p\076");',
+ assert_equal 'new Insertion.Bottom("element", "\\074p\076This is a test\\074\\/p\076");',
@generator.insert_html(:bottom, 'element', '<p>This is a test</p>')
- assert_equal 'new Insertion.Before("element", "\\074p\076This is a test\\074/p\076");',
+ assert_equal 'new Insertion.Before("element", "\\074p\076This is a test\\074\\/p\076");',
@generator.insert_html(:before, 'element', '<p>This is a test</p>')
- assert_equal 'new Insertion.After("element", "\\074p\076This is a test\\074/p\076");',
+ assert_equal 'new Insertion.After("element", "\\074p\076This is a test\\074\\/p\076");',
@generator.insert_html(:after, 'element', '<p>This is a test</p>')
end
def test_replace_html_with_string
- assert_equal 'Element.update("element", "\\074p\\076This is a test\\074/p\\076");',
+ assert_equal 'Element.update("element", "\\074p\\076This is a test\\074\\/p\\076");',
@generator.replace_html('element', '<p>This is a test</p>')
end
def test_replace_element_with_string
- assert_equal 'Element.replace("element", "\\074div id=\"element\"\\076\\074p\\076This is a test\\074/p\\076\\074/div\\076");',
+ assert_equal 'Element.replace("element", "\\074div id=\"element\"\\076\\074p\\076This is a test\\074\\/p\\076\\074\\/div\\076");',
@generator.replace('element', '<div id="element"><p>This is a test</p></div>')
end
@@ -356,7 +356,7 @@ class JavaScriptGeneratorTest < Test::Unit::TestCase
end
def test_redirect_to
- assert_equal 'window.location.href = "http://www.example.com/welcome";',
+ assert_equal 'window.location.href = "http:\\/\\/www.example.com\\/welcome";',
@generator.redirect_to(:action => 'welcome')
end
@@ -375,10 +375,10 @@ class JavaScriptGeneratorTest < Test::Unit::TestCase
@generator.replace_html('baz', '<p>This is a test</p>')
assert_equal <<-EOS.chomp, @generator.to_s
-new Insertion.Top("element", "\\074p\\076This is a test\\074/p\\076");
-new Insertion.Bottom("element", "\\074p\\076This is a test\\074/p\\076");
+new Insertion.Top("element", "\\074p\\076This is a test\\074\\/p\\076");
+new Insertion.Bottom("element", "\\074p\\076This is a test\\074\\/p\\076");
["foo", "bar"].each(Element.remove);
-Element.update("baz", "\\074p\\076This is a test\\074/p\\076");
+Element.update("baz", "\\074p\\076This is a test\\074\\/p\\076");
EOS
end