states('superuser')->create(); Auth::login($admin); $cat = $this->createValidCategory('asset-laptop-category', ['require_acceptance' => true]); $model = $this->createValidAssetModel('mbp-13-model', ['category_id' => $cat->id]); $asset = $this->createValidAsset(['model_id' => $model->id]); $user = $this->createValidUser(); Notification::fake(); $asset->checkOut($user, 1); Notification::assertSentTo($user, CheckoutAssetNotification::class); } }