fix tests
This commit is contained in:
@@ -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.'>',
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user