Permalink
Browse files

Fixed broken flash tests

  • Loading branch information...
1 parent cd5960e commit b97e087321f33283d836c5b5964976c88230349a @chancancode chancancode committed Feb 11, 2014
Showing with 5 additions and 5 deletions.
  1. +1 −1 actionpack/lib/action_dispatch/middleware/flash.rb
  2. +4 −4 actionpack/test/controller/flash_test.rb
@@ -120,7 +120,7 @@ def [](k)
def update(h) #:nodoc:
@discard.subtract stringify_array(h.keys)
- @flashes.update h
+ @flashes.update h.stringify_keys
self
end
@@ -175,13 +175,13 @@ def test_keep_and_discard_return_values
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

0 comments on commit b97e087

Please sign in to comment.