diff options
author | Joshua Peek <josh@joshpeek.com> | 2010-01-30 15:20:00 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2010-01-30 15:20:00 -0600 |
commit | b3787643ec4b24b4628e29ebccc5fb517b01b824 (patch) | |
tree | 6dc9ab754d96245ab96e4f43df154dd0495bd7ed /actionpack/test/template/javascript_helper_test.rb | |
parent | 2de311a09363f0e7bb4e21cef8e77df7ee92d33f (diff) | |
download | rails-b3787643ec4b24b4628e29ebccc5fb517b01b824.tar.gz rails-b3787643ec4b24b4628e29ebccc5fb517b01b824.tar.bz2 rails-b3787643ec4b24b4628e29ebccc5fb517b01b824.zip |
Move link_to_function and link_to_remote into prototype_legacy_helper
plugin
Diffstat (limited to 'actionpack/test/template/javascript_helper_test.rb')
-rw-r--r-- | actionpack/test/template/javascript_helper_test.rb | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/actionpack/test/template/javascript_helper_test.rb b/actionpack/test/template/javascript_helper_test.rb index 03caad3d46..b3e7abc387 100644 --- a/actionpack/test/template/javascript_helper_test.rb +++ b/actionpack/test/template/javascript_helper_test.rb @@ -30,35 +30,6 @@ class JavaScriptHelperTest < ActionView::TestCase assert_equal %(dont <\\/close> tags), escape_javascript(%(dont </close> tags)) end - def test_link_to_function - assert_dom_equal %(<a href="#" onclick="alert('Hello world!'); return false;">Greeting</a>), - link_to_function("Greeting", "alert('Hello world!')") - end - - def test_link_to_function_with_existing_onclick - assert_dom_equal %(<a href="#" onclick="confirm('Sanity!'); alert('Hello world!'); return false;">Greeting</a>), - link_to_function("Greeting", "alert('Hello world!')", :onclick => "confirm('Sanity!')") - end - - def test_link_to_function_with_rjs_block - html = link_to_function( "Greet me!" ) do |page| - page.replace_html 'header', "<h1>Greetings</h1>" - end - assert_dom_equal %(<a href="#" onclick="Element.update("header", "\\u003Ch1\\u003EGreetings\\u003C/h1\\u003E");; return false;">Greet me!</a>), 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', "<h1>Greetings</h1>" - end - assert_dom_equal %(<a href="#" class="updater" onclick="Element.update("header", "\\u003Ch1\\u003EGreetings\\u003C/h1\\u003E");; return false;">Greet me!</a>), html - end - - def test_link_to_function_with_href - assert_dom_equal %(<a href="http://example.com/" onclick="alert('Hello world!'); return false;">Greeting</a>), - link_to_function("Greeting", "alert('Hello world!')", :href => 'http://example.com/') - end - def test_button_to_function assert_dom_equal %(<input type="button" onclick="alert('Hello world!');" value="Greeting" />), button_to_function("Greeting", "alert('Hello world!')") |