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:
Ryuta Kamizono 2023-10-21 06:50:57 +09:00
parent f48c3ad9e8
commit c3446327df
1 changed files with 3 additions and 0 deletions

View File

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