diff options
author | Godfrey Chan <godfreykfc@gmail.com> | 2014-02-11 00:38:36 -0800 |
---|---|---|
committer | Godfrey Chan <godfreykfc@gmail.com> | 2014-02-11 01:54:17 -0800 |
commit | b97e087321f33283d836c5b5964976c88230349a (patch) | |
tree | daf5538d0d43815908324b9bb86d23e95c9abfe9 | |
parent | cd5960e9761c8618a89bf40a3048e330fd08143c (diff) | |
download | rails-b97e087321f33283d836c5b5964976c88230349a.tar.gz rails-b97e087321f33283d836c5b5964976c88230349a.tar.bz2 rails-b97e087321f33283d836c5b5964976c88230349a.zip |
Fixed broken flash tests
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/flash.rb | 2 | ||||
-rw-r--r-- | actionpack/test/controller/flash_test.rb | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/flash.rb b/actionpack/lib/action_dispatch/middleware/flash.rb index 1e45a38e5f..b82f0f0825 100644 --- a/actionpack/lib/action_dispatch/middleware/flash.rb +++ b/actionpack/lib/action_dispatch/middleware/flash.rb @@ -120,7 +120,7 @@ module ActionDispatch def update(h) #:nodoc: @discard.subtract stringify_array(h.keys) - @flashes.update h + @flashes.update h.stringify_keys self end diff --git a/actionpack/test/controller/flash_test.rb b/actionpack/test/controller/flash_test.rb index 9ceab91e42..25a4857eba 100644 --- a/actionpack/test/controller/flash_test.rb +++ b/actionpack/test/controller/flash_test.rb @@ -175,13 +175,13 @@ class FlashTest < ActionController::TestCase assert_equal(:foo_indeed, flash.discard(:foo)) # valid key passed assert_nil flash.discard(:unknown) # non existent key passed - assert_equal({:foo => :foo_indeed, :bar => :bar_indeed}, flash.discard().to_hash) # nothing passed - assert_equal({:foo => :foo_indeed, :bar => :bar_indeed}, flash.discard(nil).to_hash) # nothing passed + assert_equal({"foo" => :foo_indeed, "bar" => :bar_indeed}, flash.discard().to_hash) # nothing passed + assert_equal({"foo" => :foo_indeed, "bar" => :bar_indeed}, flash.discard(nil).to_hash) # nothing passed assert_equal(:foo_indeed, flash.keep(:foo)) # valid key passed assert_nil flash.keep(:unknown) # non existent key passed - assert_equal({:foo => :foo_indeed, :bar => :bar_indeed}, flash.keep().to_hash) # nothing passed - assert_equal({:foo => :foo_indeed, :bar => :bar_indeed}, flash.keep(nil).to_hash) # nothing passed + assert_equal({"foo" => :foo_indeed, "bar" => :bar_indeed}, flash.keep().to_hash) # nothing passed + assert_equal({"foo" => :foo_indeed, "bar" => :bar_indeed}, flash.keep(nil).to_hash) # nothing passed end def test_redirect_to_with_alert |