aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-03-13 05:44:18 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-03-13 05:44:18 +0000
commitf770165cc23a44ac329b5b1fbd47376a6c2e3f11 (patch)
treec63dea6404c89bd271e9eb304a1539d8a3950dd9 /actionpack/test/controller
parent42f8e3f611fa12b37793620ca2f7bd5c360631c8 (diff)
downloadrails-f770165cc23a44ac329b5b1fbd47376a6c2e3f11.tar.gz
rails-f770165cc23a44ac329b5b1fbd47376a6c2e3f11.tar.bz2
rails-f770165cc23a44ac329b5b1fbd47376a6c2e3f11.zip
Deprecation: remove deprecated url_for(:symbol, *args) and redirect_to(:symbol, *args) controller methods. Use named routes instead.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6412 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/deprecation/deprecated_base_methods_test.rb12
-rwxr-xr-xactionpack/test/controller/redirect_test.rb22
-rw-r--r--actionpack/test/controller/test_test.rb14
3 files changed, 3 insertions, 45 deletions
diff --git a/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb b/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb
index 3256b77477..7c6afd358f 100644
--- a/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb
+++ b/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb
@@ -2,10 +2,6 @@ require File.dirname(__FILE__) + '/../../abstract_unit'
class DeprecatedBaseMethodsTest < Test::Unit::TestCase
class Target < ActionController::Base
- def deprecated_symbol_parameter_to_url_for
- redirect_to(url_for(:home_url, "superstars"))
- end
-
def deprecated_render_parameters
render "fun/games/hello_world"
end
@@ -29,14 +25,6 @@ class DeprecatedBaseMethodsTest < Test::Unit::TestCase
@controller = Target.new
end
- def test_deprecated_symbol_parameter_to_url_for
- assert_deprecated("url_for(:home_url)") do
- get :deprecated_symbol_parameter_to_url_for
- end
-
- assert_redirected_to "http://example.com/superstars"
- end
-
def test_deprecated_render_parameters
assert_deprecated("render('fun/games/hello_world')") do
get :deprecated_render_parameters
diff --git a/actionpack/test/controller/redirect_test.rb b/actionpack/test/controller/redirect_test.rb
index 575532c1be..df037ec28d 100755
--- a/actionpack/test/controller/redirect_test.rb
+++ b/actionpack/test/controller/redirect_test.rb
@@ -4,11 +4,7 @@ class RedirectController < ActionController::Base
def simple_redirect
redirect_to :action => "hello_world"
end
-
- def method_redirect
- redirect_to :dashbord_url, 1, "hello"
- end
-
+
def host_redirect
redirect_to :action => "other_host", :only_path => false, :host => 'other.test.host'
end
@@ -49,12 +45,6 @@ class RedirectTest < Test::Unit::TestCase
assert_equal "http://test.host/redirect/hello_world", redirect_to_url
end
- def test_redirect_with_method_reference_and_parameters
- assert_deprecated(/redirect_to/) { get :method_redirect }
- assert_response :redirect
- assert_equal "http://test.host/redirect/dashboard/1?message=hello", redirect_to_url
- end
-
def test_simple_redirect_using_options
get :host_redirect
assert_response :redirect
@@ -122,19 +112,13 @@ module ModuleTest
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
end
-
+
def test_simple_redirect
get :simple_redirect
assert_response :redirect
assert_equal "http://test.host/module_test/module_redirect/hello_world", redirect_to_url
end
-
- def test_redirect_with_method_reference_and_parameters
- assert_deprecated(/redirect_to/) { get :method_redirect }
- assert_response :redirect
- assert_equal "http://test.host/module_test/module_redirect/dashboard/1?message=hello", redirect_to_url
- end
-
+
def test_simple_redirect_using_options
get :host_redirect
assert_response :redirect
diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb
index ab44fbf3ca..e2f78ad30c 100644
--- a/actionpack/test/controller/test_test.rb
+++ b/actionpack/test/controller/test_test.rb
@@ -54,10 +54,6 @@ HTML
render :text => params[:file].size
end
- def redirect_to_symbol
- redirect_to :generate_url, :id => 5
- end
-
def redirect_to_same_controller
redirect_to :controller => 'test', :action => 'test_uri', :id => 5
end
@@ -440,16 +436,6 @@ HTML
assert_raise(RuntimeError) { ActionController::TestUploadedFile.new('non_existent_file') }
end
- def test_assert_redirected_to_symbol
- with_foo_routing do |set|
- assert_deprecated(/generate_url.*redirect_to/) do
- get :redirect_to_symbol
- end
- assert_response :redirect
- assert_redirected_to :generate_url
- end
- end
-
def test_assert_follow_redirect_to_same_controller
with_foo_routing do |set|
get :redirect_to_same_controller