fix tests

This commit is contained in:
Godfrey M
2025-09-08 14:56:15 -07:00
parent 00e8fd0483
commit e652a7fd61
2 changed files with 2 additions and 2 deletions

View File

@@ -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.'>',

View File

@@ -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('someone@example.com');
});