mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
"Use assert_nil if expecting nil from ...:in `...'. This will fail in minitest 6."
This commit is contained in:
parent
4ba9e61d99
commit
019cc5960d
3 changed files with 4 additions and 5 deletions
|
@ -166,8 +166,7 @@ class HttpTokenAuthenticationTest < ActionController::TestCase
|
||||||
|
|
||||||
test "token_and_options returns nil with no value after the equal sign" do
|
test "token_and_options returns nil with no value after the equal sign" do
|
||||||
actual = ActionController::HttpAuthentication::Token.token_and_options(malformed_request).first
|
actual = ActionController::HttpAuthentication::Token.token_and_options(malformed_request).first
|
||||||
expected = nil
|
assert_nil actual
|
||||||
assert_equal(expected, actual)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
test "raw_params returns a tuple of two key value pair strings" do
|
test "raw_params returns a tuple of two key value pair strings" do
|
||||||
|
|
|
@ -537,10 +537,10 @@ class HashExtTest < ActiveSupport::TestCase
|
||||||
get_hash = proc { { a: "foo" }.with_indifferent_access }
|
get_hash = proc { { a: "foo" }.with_indifferent_access }
|
||||||
hash = get_hash.call
|
hash = get_hash.call
|
||||||
assert_equal "foo", hash.delete(:a)
|
assert_equal "foo", hash.delete(:a)
|
||||||
assert_equal nil, hash.delete(:a)
|
assert_nil hash.delete(:a)
|
||||||
hash = get_hash.call
|
hash = get_hash.call
|
||||||
assert_equal "foo", hash.delete("a")
|
assert_equal "foo", hash.delete("a")
|
||||||
assert_equal nil, hash.delete("a")
|
assert_nil hash.delete("a")
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_indifferent_select
|
def test_indifferent_select
|
||||||
|
|
|
@ -175,6 +175,6 @@ class SafeBufferTest < ActiveSupport::TestCase
|
||||||
|
|
||||||
test "Should not affect frozen objects when accessing characters" do
|
test "Should not affect frozen objects when accessing characters" do
|
||||||
x = "Hello".html_safe
|
x = "Hello".html_safe
|
||||||
assert_equal nil, x[/a/, 1]
|
assert_nil x[/a/, 1]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue