Fix prevention for leaders
continuous-integration/drone/push Build is failing Details

This commit is contained in:
philipp lang 2024-07-12 18:06:52 +02:00
parent 146cbb0bef
commit dbde189575
2 changed files with 2 additions and 5 deletions

View File

@ -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<int, Prevention> */
$preventions = [];

View File

@ -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