diff options
author | Sam Stephenson <sam@37signals.com> | 2005-12-20 00:20:33 +0000 |
---|---|---|
committer | Sam Stephenson <sam@37signals.com> | 2005-12-20 00:20:33 +0000 |
commit | c61d27d0c730992d3e69e18d3a8b4e7a4dfeb56b (patch) | |
tree | 12ac0a8bd50803954dba94938e1ae679c11791ee /actionpack/test/template | |
parent | 6b38b9739ac190505641e4637c79b3ff20950bb2 (diff) | |
download | rails-c61d27d0c730992d3e69e18d3a8b4e7a4dfeb56b.tar.gz rails-c61d27d0c730992d3e69e18d3a8b4e7a4dfeb56b.tar.bz2 rails-c61d27d0c730992d3e69e18d3a8b4e7a4dfeb56b.zip |
Add additional RJS functionality: alert, redirect_to, call, assign, and <<
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3319 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/prototype_helper_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/template/prototype_helper_test.rb b/actionpack/test/template/prototype_helper_test.rb index 32292a7e18..56485bc21c 100644 --- a/actionpack/test/template/prototype_helper_test.rb +++ b/actionpack/test/template/prototype_helper_test.rb @@ -192,6 +192,15 @@ class JavaScriptGeneratorTest < Test::Unit::TestCase @generator.hide('foo', 'bar', 'baz') end + def test_alert + assert_equal 'alert("hello");', @generator.alert('hello') + end + + def test_redirect_to + assert_equal 'window.location.href = "http://www.example.com/welcome";', + @generator.redirect_to(:action => 'welcome') + end + def test_to_s @generator.insert_html(:top, 'element', '<p>This is a test</p>') @generator.insert_html(:bottom, 'element', '<p>This is a test</p>') |