php
it('extends the expiry date of an expired invitation', function () {
$this->invitation->update([
'expires_at' => now()->subDays(1),
'status' => InvitationStatus::Expired,
]);
$this->invitation->refresh();
expect($this->invitation->expiryDatePassed())->toBeTrue()
->and($this->invitation->status)->toBe(InvitationStatus::Expired);
Livewire::test(ListInvitations::class)
->callTableAction('extendExpiryDate', $this->invitation)
->assertHasNoActionErrors();
$this->invitation->refresh();
// Fails Here
expect($this->invitation->expires_at->isFuture())->toBeTrue()
->and($this->invitation->status)->toBe(InvitationStatus::Pending);
});
php
it('extends the expiry date of an expired invitation', function () {
$this->invitation->update([
'expires_at' => now()->subDays(1),
'status' => InvitationStatus::Expired,
]);
$this->invitation->refresh();
expect($this->invitation->expiryDatePassed())->toBeTrue()
->and($this->invitation->status)->toBe(InvitationStatus::Expired);
Livewire::test(ListInvitations::class)
->callTableAction('extendExpiryDate', $this->invitation)
->assertHasNoActionErrors();
$this->invitation->refresh();
// Fails Here
expect($this->invitation->expires_at->isFuture())->toBeTrue()
->and($this->invitation->status)->toBe(InvitationStatus::Pending);
});