aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-08-29 21:08:14 -0300
committerJosé Valim <jose.valim@gmail.com>2010-08-29 21:08:14 -0300
commitba52748d05da4f95a8f371d628af97b76644bdd3 (patch)
tree0f104ebfdb7c5dfd25dba227d7e6708b904e08c6 /actionpack/test/controller
parent800695ad4cef33347bcfef6df7634ff533582449 (diff)
downloadrails-ba52748d05da4f95a8f371d628af97b76644bdd3.tar.gz
rails-ba52748d05da4f95a8f371d628af97b76644bdd3.tar.bz2
rails-ba52748d05da4f95a8f371d628af97b76644bdd3.zip
Remove deprecated support to <% form_for %> and several ActionController::Base methods.
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/assert_select_test.rb6
-rw-r--r--actionpack/test/controller/base_test.rb14
-rw-r--r--actionpack/test/controller/dispatcher_test.rb59
3 files changed, 2 insertions, 77 deletions
diff --git a/actionpack/test/controller/assert_select_test.rb b/actionpack/test/controller/assert_select_test.rb
index ef0df9d6a8..2600dae3c5 100644
--- a/actionpack/test/controller/assert_select_test.rb
+++ b/actionpack/test/controller/assert_select_test.rb
@@ -15,10 +15,8 @@ class AssertSelectTest < ActionController::TestCase
class AssertSelectMailer < ActionMailer::Base
def test(html)
- recipients "test <test@test.host>"
- from "test@test.host"
- subject "Test e-mail"
- part :content_type=>"text/html", :body=>html
+ mail :body => html, :content_type => "text/html",
+ :subject => "Test e-mail", :from => "test@test.host", :to => "test <test@test.host>"
end
end
diff --git a/actionpack/test/controller/base_test.rb b/actionpack/test/controller/base_test.rb
index 032c22db3b..5ec59acf8d 100644
--- a/actionpack/test/controller/base_test.rb
+++ b/actionpack/test/controller/base_test.rb
@@ -100,20 +100,6 @@ class ControllerClassTests < ActiveSupport::TestCase
assert_equal 'contained_empty', Submodule::ContainedEmptyController.controller_name
end
- def test_filter_parameter_logging
- parameters = []
- config = mock(:config => mock(:filter_parameters => parameters))
- Rails.expects(:application).returns(config)
-
- assert_deprecated do
- Class.new(ActionController::Base) do
- filter_parameter_logging :password
- end
- end
-
- assert_equal [:password], parameters
- end
-
def test_record_identifier
assert_respond_to RecordIdentifierController.new, :dom_id
assert_respond_to RecordIdentifierController.new, :dom_class
diff --git a/actionpack/test/controller/dispatcher_test.rb b/actionpack/test/controller/dispatcher_test.rb
deleted file mode 100644
index ebe089aaf4..0000000000
--- a/actionpack/test/controller/dispatcher_test.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-require 'abstract_unit'
-
-# Ensure deprecated dispatcher works
-class DeprecatedDispatcherTest < ActiveSupport::TestCase
- class DummyApp
- def call(env)
- [200, {}, 'response']
- end
- end
-
- def setup
- ActionDispatch::Callbacks.reset_callbacks(:prepare)
- ActionDispatch::Callbacks.reset_callbacks(:call)
- end
-
- def test_assert_deprecated_to_prepare
- a = nil
-
- assert_deprecated do
- ActionController::Dispatcher.to_prepare { a = 1 }
- end
-
- assert_nil a
- dispatch
- assert_equal 1, a
- end
-
- def test_assert_deprecated_before_dispatch
- a = nil
-
- assert_deprecated do
- ActionController::Dispatcher.before_dispatch { a = 1 }
- end
-
- assert_nil a
- dispatch
- assert_equal 1, a
- end
-
- def test_assert_deprecated_after_dispatch
- a = nil
-
- assert_deprecated do
- ActionController::Dispatcher.after_dispatch { a = 1 }
- end
-
- assert_nil a
- dispatch
- assert_equal 1, a
- end
-
- private
-
- def dispatch(cache_classes = true)
- @dispatcher ||= ActionDispatch::Callbacks.new(DummyApp.new, !cache_classes)
- @dispatcher.call({'rack.input' => StringIO.new('')})
- end
-
-end