From 8d76c9e66d6d134122b09dd24afa7e50094808f5 Mon Sep 17 00:00:00 2001 From: Matt Young Date: Thu, 3 Jul 2025 03:10:44 -0500 Subject: [PATCH] Create tests for app/Models/AuditLogEntry --- .../Feature/app/Models/AuditLogEntryTest.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/Feature/app/Models/AuditLogEntryTest.php diff --git a/tests/Feature/app/Models/AuditLogEntryTest.php b/tests/Feature/app/Models/AuditLogEntryTest.php new file mode 100644 index 0000000..9c88076 --- /dev/null +++ b/tests/Feature/app/Models/AuditLogEntryTest.php @@ -0,0 +1,24 @@ + 'test@example.com', + 'ip_address' => '127.0.0.1', + 'message' => 'Test Message', + 'affected' => ['users' => [1]], + ]); + + // Force reload to trigger the attribute accessor + $entry->refresh(); + + // The timestamp should be formatted as "M j, Y H:i:s" in America/Chicago timezone + expect($entry->created_at)->toBe('Jan 1, 2024 06:00:00'); +});