mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Tidy up tests in previous commit since they did not assure an OrderedHash is returned (the test would pass for an array and would pass by chance for hashes).
[#4875 state:resolved]
This commit is contained in:
parent
9958950f78
commit
aa48ab05f4
1 changed files with 2 additions and 3 deletions
|
@ -259,8 +259,7 @@ class OrderedHashTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_invert
|
||||
@ordered_hash = ActiveSupport::OrderedHash[[["foo", "FOO"], ["bar", "BAR"]]]
|
||||
@inverted_ordered_hash = @ordered_hash.invert
|
||||
assert_equal [["FOO", "foo"], ["BAR", "bar"]], @inverted_ordered_hash.to_a
|
||||
assert_kind_of ActiveSupport::OrderedHash, @ordered_hash.invert
|
||||
assert_equal @values.zip(@keys), @ordered_hash.invert.to_a
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue