diff options
author | Jon Wood <jonathan.wood@uk.clara.net> | 2009-05-06 16:23:20 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-08-09 02:00:15 +0100 |
commit | 271baf235d6e197a6ecd25945c34df0385137764 (patch) | |
tree | da58dbd05bfe1e66688814be3e267ae4e6536598 /actionpack/test/controller | |
parent | 89c8affe475d14f6dbe74b5e75a2613e047d01fc (diff) | |
download | rails-271baf235d6e197a6ecd25945c34df0385137764.tar.gz rails-271baf235d6e197a6ecd25945c34df0385137764.tar.bz2 rails-271baf235d6e197a6ecd25945c34df0385137764.zip |
Add :redirect to the testable RJS statements [#2612 state:resolved]
Example :
assert_select_rjs :redirect, root_path
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/assert_select_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/controller/assert_select_test.rb b/actionpack/test/controller/assert_select_test.rb index ad17d1288b..2e77d2f8ad 100644 --- a/actionpack/test/controller/assert_select_test.rb +++ b/actionpack/test/controller/assert_select_test.rb @@ -257,6 +257,13 @@ class AssertSelectTest < ActionController::TestCase end assert_raise(Assertion) {assert_select_rjs :insert, :top, "test2"} end + + def test_assert_select_rjs_for_redirect_to + render_rjs do |page| + page.redirect_to '/' + end + assert_select_rjs :redirect, '/' + end def test_elect_with_xml_namespace_attributes render_html %Q{<link xlink:href="http://nowhere.com"></link>} |