Inline variable

This commit is contained in:
Marcus Moore 2025-01-29 16:15:27 -08:00
parent 4e7c6bd2cf
commit 78f9292555
No known key found for this signature in database

View file

@ -11,7 +11,6 @@ use Tests\TestCase;
class AssetAcceptanceReminderTest extends TestCase class AssetAcceptanceReminderTest extends TestCase
{ {
private CheckoutAcceptance $checkoutAcceptance;
private User $actor; private User $actor;
protected function setUp(): void protected function setUp(): void
@ -21,15 +20,15 @@ class AssetAcceptanceReminderTest extends TestCase
Mail::fake(); Mail::fake();
$this->actor = User::factory()->canViewReports()->create(); $this->actor = User::factory()->canViewReports()->create();
$this->checkoutAcceptance = CheckoutAcceptance::factory()->pending()->create();
} }
public function testMustHavePermissionToSendReminder() public function testMustHavePermissionToSendReminder()
{ {
$checkoutAcceptance = CheckoutAcceptance::factory()->pending()->create();
$userWithoutPermission = User::factory()->create(); $userWithoutPermission = User::factory()->create();
$this->actingAs($userWithoutPermission) $this->actingAs($userWithoutPermission)
->post($this->routeFor($this->checkoutAcceptance)) ->post($this->routeFor($checkoutAcceptance))
->assertForbidden(); ->assertForbidden();
} }