aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/action_pack_assertions_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/action_pack_assertions_test.rb')
-rw-r--r--actionpack/test/controller/action_pack_assertions_test.rb27
1 files changed, 6 insertions, 21 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