From bc541442840e424ab345a65c7575c9234621fe43 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Mon, 6 Mar 2023 12:40:47 -0800 Subject: [PATCH] Fix test by passing proper user --- tests/Unit/NotificationTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Unit/NotificationTest.php b/tests/Unit/NotificationTest.php index b44284a5a..4b85fa4c4 100644 --- a/tests/Unit/NotificationTest.php +++ b/tests/Unit/NotificationTest.php @@ -20,6 +20,7 @@ class NotificationTest extends BaseTest public function testAUserIsEmailedIfTheyCheckoutAnAssetWithEULA() { + $admin = User::factory()->superuser()->create(); $user = User::factory()->create(); $asset = Asset::factory() ->create( @@ -35,7 +36,7 @@ class NotificationTest extends BaseTest ]); Notification::fake(); - $asset->checkOut($user, $asset->id); + $asset->checkOut($user, $admin->id); Notification::assertSentTo($user, CheckoutAssetNotification::class); } }