diff --git a/app/Member/Member.php b/app/Member/Member.php index 69759e5b..9868342d 100644 --- a/app/Member/Member.php +++ b/app/Member/Member.php @@ -347,9 +347,6 @@ class Member extends Model implements Geolocatable public function preventions(?Carbon $date = null): array { $date = $date ?: now(); - if (!$this->isLeader()) { - return []; - } /** @var array */ $preventions = []; diff --git a/tests/Feature/Member/PreventionTest.php b/tests/Feature/Member/PreventionTest.php index 6cdafba4..bc164a80 100644 --- a/tests/Feature/Member/PreventionTest.php +++ b/tests/Feature/Member/PreventionTest.php @@ -96,7 +96,7 @@ class PreventionTest extends TestCase $this->assertNull($participant->fresh()->last_remembered_at); } - public function testItDoesntRememberWhenMemberIsNotALeader(): void + public function testItRemembersNonLeaders(): void { Mail::fake(); $form = $this->createForm(); @@ -105,7 +105,7 @@ class PreventionTest extends TestCase PreventionRememberAction::run(); - $this->assertNull($participant->fresh()->last_remembered_at); + $this->assertNotNull($participant->fresh()->last_remembered_at); } protected function attributes(): Generator