diff options
author | Rafael Mendonça França <rafael.franca@plataformatec.com.br> | 2014-11-11 01:04:06 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafael.franca@plataformatec.com.br> | 2014-11-11 01:04:06 -0200 |
commit | 3c60fb429d9e4271bce3a71b0f5fb4bb2f7fbe2d (patch) | |
tree | fce9ddc40e2243386bb14eadb7b35f7ee04af7a2 /actionpack/test/controller | |
parent | d4ce2bb06d6479a99657617294a4fe7fd6cafa73 (diff) | |
download | rails-3c60fb429d9e4271bce3a71b0f5fb4bb2f7fbe2d.tar.gz rails-3c60fb429d9e4271bce3a71b0f5fb4bb2f7fbe2d.tar.bz2 rails-3c60fb429d9e4271bce3a71b0f5fb4bb2f7fbe2d.zip |
Make FlashHash#key? work with symbol and string
Closes #17586
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/flash_hash_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/controller/flash_hash_test.rb b/actionpack/test/controller/flash_hash_test.rb index 50b36a0567..d979b561f2 100644 --- a/actionpack/test/controller/flash_hash_test.rb +++ b/actionpack/test/controller/flash_hash_test.rb @@ -29,6 +29,15 @@ module ActionDispatch assert_equal 'world', @hash['hello'] end + def test_key + @hash['foo'] = 'bar' + + assert @hash.key?('foo') + assert @hash.key?(:foo) + assert_not @hash.key?('bar') + assert_not @hash.key?(:bar) + end + def test_delete @hash['foo'] = 'bar' @hash.delete 'foo' |