Fix test by passing proper user

This commit is contained in:
Marcus Moore 2023-03-06 12:40:47 -08:00
parent e8da6d8bac
commit bc54144284
No known key found for this signature in database

View file

@ -20,6 +20,7 @@ class NotificationTest extends BaseTest
public function testAUserIsEmailedIfTheyCheckoutAnAssetWithEULA() public function testAUserIsEmailedIfTheyCheckoutAnAssetWithEULA()
{ {
$admin = User::factory()->superuser()->create();
$user = User::factory()->create(); $user = User::factory()->create();
$asset = Asset::factory() $asset = Asset::factory()
->create( ->create(
@ -35,7 +36,7 @@ class NotificationTest extends BaseTest
]); ]);
Notification::fake(); Notification::fake();
$asset->checkOut($user, $asset->id); $asset->checkOut($user, $admin->id);
Notification::assertSentTo($user, CheckoutAssetNotification::class); Notification::assertSentTo($user, CheckoutAssetNotification::class);
} }
} }