From 097e4afcbacfe50abd97679adcf5fcf9a0dd87f1 Mon Sep 17 00:00:00 2001 From: Dylan Thacker-Smith Date: Tue, 23 Mar 2021 20:28:59 -0700 Subject: [PATCH] Add an assertion to the regression test Co-authored-by: Ryuta Kamizono --- activerecord/test/cases/filter_attributes_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activerecord/test/cases/filter_attributes_test.rb b/activerecord/test/cases/filter_attributes_test.rb index c27447a66a..e26eb2c109 100644 --- a/activerecord/test/cases/filter_attributes_test.rb +++ b/activerecord/test/cases/filter_attributes_test.rb @@ -65,9 +65,9 @@ class FilterAttributesTest < ActiveRecord::TestCase test "proc filter_attributes don't prevent marshal dump" do ActiveRecord::Base.filter_attributes = [ lambda { |key, value| value.reverse! if key == "name" } ] - account = Admin::Account.new(name: "37signals") + account = Admin::Account.new(id: 123, name: "37signals") account.inspect - Marshal.dump(account) + assert_equal account, Marshal.load(Marshal.dump(account)) end test "filter_attributes could be overwritten by models" do