Fix prevention for leaders
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
146cbb0bef
commit
dbde189575
|
@ -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 = [];
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue