1
0
Fork 0
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:
Ufuk Kayserilioglu 2019-02-10 17:44:07 +02:00 committed by Gannon McGibbon
parent 325e917f5a
commit de96628c76

View file

@ -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