A free open source IT asset/license management system
fix tests
Godfrey Me652a7fd6105
diff --git a/app/Notifications/AuditNotification.php b/app/Notifications/AuditNotification.phpindex 3acce861b4..6d71e21bd2 100644--- a/app/Notifications/AuditNotification.php+++ b/app/Notifications/AuditNotification.php@@ -61,7 +61,7 @@ use NotificationChannels\MicrosoftTeams\MicrosoftTeamsMessage;->from(($this->settings->webhook_botname) ? $this->settings->webhook_botname : 'Snipe-Bot')->to($channel)->attachment(function ($attachment) {- $item = $this->params['item'];+ $item = $this->params['item'] ?? null;$admin_user = $this->params['admin'];$fields = ['By' => '<'.$admin_user->present()->viewUrl().'|'.$admin_user->display_name.'>',diff --git a/tests/Feature/Checkouts/Ui/BulkAssetCheckoutTest.php b/tests/Feature/Checkouts/Ui/BulkAssetCheckoutTest.phpindex c525f763ad..f05c4389e6 100644--- a/tests/Feature/Checkouts/Ui/BulkAssetCheckoutTest.php+++ b/tests/Feature/Checkouts/Ui/BulkAssetCheckoutTest.php@@ -58,7 +58,7 @@ class BulkAssetCheckoutTest extends TestCase$this->assertHasTheseActionLogs($asset, ['create', 'checkout']); //Note: '$this' gets auto-bound in closures, so this does work.});- Mail::assertSent(CheckoutAssetMail::class, 4);+ Mail::assertSent(CheckoutAssetMail::class, 2);Mail::assertSent(CheckoutAssetMail::class, function (CheckoutAssetMail $mail) {return $mail->hasTo('[email protected]');});