aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/action_pack_assertions_test.rb27
-rw-r--r--actionpack/test/controller/test_test.rb7
2 files changed, 6 insertions, 28 deletions
diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb
index c805742359..4f215c6df1 100644
--- a/actionpack/test/controller/action_pack_assertions_test.rb
+++ b/actionpack/test/controller/action_pack_assertions_test.rb
@@ -315,33 +315,22 @@ class ActionPackAssertionsControllerTest < ActionController::TestCase
# check the empty flashing
def test_flash_me_naked
process :flash_me_naked
- assert_deprecated do
- assert !@response.has_flash?
- assert !@response.has_flash_with_contents?
- end
+ assert flash.empty?
end
# check if we have flash objects
def test_flash_haves
process :flash_me
- assert_deprecated do
- assert @response.has_flash?
- assert @response.has_flash_with_contents?
- assert @response.has_flash_object?('hello')
- end
+ assert flash.any?
+ assert_present flash['hello']
end
# ensure we don't have flash objects
def test_flash_have_nots
process :nothing
- assert_deprecated do
- assert !@response.has_flash?
- assert !@response.has_flash_with_contents?
- assert_nil @response.flash['hello']
- end
+ assert flash.empty?
end
-
# check if we were rendered by a file-based template?
def test_rendered_action
process :nothing
@@ -393,12 +382,8 @@ class ActionPackAssertionsControllerTest < ActionController::TestCase
def test_redirect_url_match
process :redirect_external
assert @response.redirect?
- assert_deprecated do
- assert @response.redirect_url_match?("rubyonrails")
- assert @response.redirect_url_match?(/rubyonrails/)
- assert !@response.redirect_url_match?("phpoffrails")
- assert !@response.redirect_url_match?(/perloffrails/)
- end
+ assert_match /rubyonrails/, @response.redirect_url
+ assert !/perloffrails/.match(@response.redirect_url)
end
# check for a redirection
diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb
index fc7d314e04..e90fc49542 100644
--- a/actionpack/test/controller/test_test.rb
+++ b/actionpack/test/controller/test_test.rb
@@ -674,13 +674,6 @@ XML
assert_redirected_to 'created resource'
end
end
-
- def test_binary_content_works_with_send_file
- get :test_send_file
- assert_deprecated do
- assert_nothing_raised(NoMethodError) { @response.binary_content }
- end
- end
end
class InferringClassNameTest < ActionController::TestCase