From 1feb74de991e38842be1b64c8b3fcd59d5da57d7 Mon Sep 17 00:00:00 2001 From: George Jahad Date: Fri, 22 Nov 2024 15:03:11 -0800 Subject: [PATCH 1/2] added missing test --- test/models/audit_log_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/models/audit_log_test.rb b/test/models/audit_log_test.rb index 02e56c6..fc5c3f0 100644 --- a/test/models/audit_log_test.rb +++ b/test/models/audit_log_test.rb @@ -18,6 +18,12 @@ def setup end end + test "#new should not set attributes not in attributes argument" do + [:error, :kv_path].each do |key| + assert_nil @audit_log.send(key), "Attribute #{key} was not set correctly" + end + end + test "#valid? should be valid with valid attributes" do assert @audit_log.valid? end From 88db1551332918aabf1220fd431dcacc0206ae52 Mon Sep 17 00:00:00 2001 From: George Jahad Date: Fri, 22 Nov 2024 15:28:57 -0800 Subject: [PATCH 2/2] cleanup --- test/models/audit_log_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/models/audit_log_test.rb b/test/models/audit_log_test.rb index fc5c3f0..587e828 100644 --- a/test/models/audit_log_test.rb +++ b/test/models/audit_log_test.rb @@ -19,7 +19,7 @@ def setup end test "#new should not set attributes not in attributes argument" do - [:error, :kv_path].each do |key| + [ :error, :kv_path ].each do |key| assert_nil @audit_log.send(key), "Attribute #{key} was not set correctly" end end