mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix assertion excpected/actual order
The assertion from the previous PR had the expected and the actual values in the wrong order, so when a test failed the error message was confusing. This commit fixes the problem by switching the order.
This commit is contained in:
parent
325e917f5a
commit
de96628c76
1 changed files with 6 additions and 6 deletions
|
@ -1782,12 +1782,12 @@ module ApplicationTests
|
|||
|
||||
actual = Rails.application.config.my_custom_config
|
||||
|
||||
assert_equal actual, foo: 0, bar: { baz: 1 }
|
||||
assert_equal actual.keys, [ :foo, :bar ]
|
||||
assert_equal actual.values, [ 0, baz: 1]
|
||||
assert_equal actual.to_h, foo: 0, bar: { baz: 1 }
|
||||
assert_equal actual[:foo], 0
|
||||
assert_equal actual[:bar], baz: 1
|
||||
assert_equal({ foo: 0, bar: { baz: 1 } }, actual)
|
||||
assert_equal([ :foo, :bar ], actual.keys)
|
||||
assert_equal([ 0, baz: 1], actual.values)
|
||||
assert_equal({ foo: 0, bar: { baz: 1 } }, actual.to_h)
|
||||
assert_equal(0, actual[:foo])
|
||||
assert_equal({ baz: 1 }, actual[:bar])
|
||||
end
|
||||
|
||||
test "config_for generates deprecation notice when nested hash methods are called with non-symbols" do
|
||||
|
|
Loading…
Reference in a new issue