From 32b307bc32e12626b0e6ae493cc3ab34b4c5ea37 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Tue, 29 May 2007 09:42:13 +0000 Subject: fix test cases to match new json output. Closes #8371 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6894 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/template/javascript_helper_test.rb | 8 ++++---- actionpack/test/template/prototype_helper_test.rb | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'actionpack/test') diff --git a/actionpack/test/template/javascript_helper_test.rb b/actionpack/test/template/javascript_helper_test.rb index a2454a03e4..7ffc381df5 100644 --- a/actionpack/test/template/javascript_helper_test.rb +++ b/actionpack/test/template/javascript_helper_test.rb @@ -36,14 +36,14 @@ class JavaScriptHelperTest < Test::Unit::TestCase html = link_to_function( "Greet me!" ) do |page| page.replace_html 'header', "

Greetings

" end - assert_dom_equal %(Greet me!), html + assert_dom_equal %(Greet me!), html end def test_link_to_function_with_rjs_block_and_options html = link_to_function( "Greet me!", :class => "updater" ) do |page| page.replace_html 'header', "

Greetings

" end - assert_dom_equal %(Greet me!), html + assert_dom_equal %(Greet me!), html end def test_button_to_function @@ -55,13 +55,13 @@ class JavaScriptHelperTest < Test::Unit::TestCase html = button_to_function( "Greet me!" ) do |page| page.replace_html 'header', "

Greetings

" end - assert_dom_equal %(), html + assert_dom_equal %(), html end def test_button_to_function_with_rjs_block_and_options html = button_to_function( "Greet me!", :class => "greeter" ) do |page| page.replace_html 'header', "

Greetings

" end - assert_dom_equal %(), html + assert_dom_equal %(), html end end diff --git a/actionpack/test/template/prototype_helper_test.rb b/actionpack/test/template/prototype_helper_test.rb index a94802fdfb..033e75de78 100644 --- a/actionpack/test/template/prototype_helper_test.rb +++ b/actionpack/test/template/prototype_helper_test.rb @@ -232,23 +232,23 @@ class JavaScriptGeneratorTest < Test::Unit::TestCase end def test_insert_html_with_string - assert_equal 'new Insertion.Top("element", "

This is a test

");', + assert_equal 'new Insertion.Top("element", "\\074p\\076This is a test\\074/p\\076");', @generator.insert_html(:top, 'element', '

This is a test

') - assert_equal 'new Insertion.Bottom("element", "

This is a test

");', + assert_equal 'new Insertion.Bottom("element", "\\074p\076This is a test\\074/p\076");', @generator.insert_html(:bottom, 'element', '

This is a test

') - assert_equal 'new Insertion.Before("element", "

This is a test

");', + assert_equal 'new Insertion.Before("element", "\\074p\076This is a test\\074/p\076");', @generator.insert_html(:before, 'element', '

This is a test

') - assert_equal 'new Insertion.After("element", "

This is a test

");', + assert_equal 'new Insertion.After("element", "\\074p\076This is a test\\074/p\076");', @generator.insert_html(:after, 'element', '

This is a test

') end def test_replace_html_with_string - assert_equal 'Element.update("element", "

This is a test

");', + assert_equal 'Element.update("element", "\\074p\\076This is a test\\074/p\\076");', @generator.replace_html('element', '

This is a test

') end def test_replace_element_with_string - assert_equal 'Element.replace("element", "

This is a test

");', + assert_equal 'Element.replace("element", "\\074div id=\"element\"\\076\\074p\\076This is a test\\074/p\\076\\074/div\\076");', @generator.replace('element', '

This is a test

') end @@ -304,10 +304,10 @@ class JavaScriptGeneratorTest < Test::Unit::TestCase @generator.replace_html('baz', '

This is a test

') assert_equal <<-EOS.chomp, @generator.to_s -new Insertion.Top("element", "

This is a test

"); -new Insertion.Bottom("element", "

This is a test

"); +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", "

This is a test

"); +Element.update("baz", "\\074p\\076This is a test\\074/p\\076"); EOS end -- cgit v1.2.3