Skip to content

A free open source IT asset/license management system

Fix test by passing proper user

Marcus Moorebc541442840e
diff --git a/tests/Unit/NotificationTest.php b/tests/Unit/NotificationTest.php
index b44284a5ab..4b85fa4c4b 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);
}
}