diff options
author | Akira Matsuda <ronnie@dio.jp> | 2016-12-25 09:59:16 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2016-12-25 09:59:16 +0900 |
commit | 630cc857c9dfc68fd7c8761a597675d016daa375 (patch) | |
tree | 103a74df6b2cd7e8c495fd7d422cc97d923f51d4 /actionpack | |
parent | 5b874cf42a41b966ca223a278b77fd0b4144ddb6 (diff) | |
download | rails-630cc857c9dfc68fd7c8761a597675d016daa375.tar.gz rails-630cc857c9dfc68fd7c8761a597675d016daa375.tar.bz2 rails-630cc857c9dfc68fd7c8761a597675d016daa375.zip |
"Use assert_nil if expecting nil from ...:in `...'. This will fail in MT6."
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/controller/flash_hash_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/test/controller/flash_hash_test.rb b/actionpack/test/controller/flash_hash_test.rb index 6b3abdd5be..45b598a594 100644 --- a/actionpack/test/controller/flash_hash_test.rb +++ b/actionpack/test/controller/flash_hash_test.rb @@ -63,10 +63,10 @@ module ActionDispatch assert_equal({ "flashes" => { "foo" => "bar" }, "discard" => [] }, @hash.to_session_value) @hash.discard("foo") - assert_equal(nil, @hash.to_session_value) + assert_nil(@hash.to_session_value) @hash.sweep - assert_equal(nil, @hash.to_session_value) + assert_nil(@hash.to_session_value) end def test_from_session_value @@ -75,7 +75,7 @@ module ActionDispatch session = Marshal.load(Base64.decode64(rails_3_2_cookie)) hash = Flash::FlashHash.from_session_value(session["flash"]) assert_equal({ "greeting" => "Hello" }, hash.to_hash) - assert_equal(nil, hash.to_session_value) + assert_nil(hash.to_session_value) end def test_from_session_value_on_json_serializer @@ -84,7 +84,7 @@ module ActionDispatch hash = Flash::FlashHash.from_session_value(session["flash"]) assert_equal({ "greeting" => "Hello" }, hash.to_hash) - assert_equal(nil, hash.to_session_value) + assert_nil(hash.to_session_value) assert_equal "Hello", hash[:greeting] assert_equal "Hello", hash["greeting"] end |