mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 22:19:41 -08:00
Fix test by passing proper user
This commit is contained in:
parent
e8da6d8bac
commit
bc54144284
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue