mirror of https://github.com/rails/rails
Exercise comparability test with LazyAttributeSet
LazyAttributeSet was added at #39612 for performance reason, it should
not break comparability with AttributeSet, which was added at 9e25e0e
.
This commit is contained in:
parent
f48c3ad9e8
commit
c3446327df
|
@ -274,9 +274,12 @@ module ActiveModel
|
|||
attributes = builder.build_from_database(foo: "1", bar: "2")
|
||||
attributes2 = builder.build_from_database(foo: "1", bar: "2")
|
||||
attributes3 = builder.build_from_database(foo: "2", bar: "2")
|
||||
attributes4 = attributes.deep_dup
|
||||
|
||||
assert_equal attributes, attributes2
|
||||
assert_not_equal attributes2, attributes3
|
||||
assert_equal attributes, attributes4
|
||||
assert_equal attributes4, attributes
|
||||
end
|
||||
|
||||
test "==(other) is safe to use with any instance" do
|
||||
|
|
Loading…
Reference in New Issue