more test work

This commit is contained in:
akemidx 2024-08-21 17:10:33 -04:00
parent 93f995a396
commit f063275969
3 changed files with 4 additions and 10 deletions

View file

@ -263,12 +263,7 @@ class CheckoutableListener
private function shouldNotSendAnyNotifications($checkoutable): bool private function shouldNotSendAnyNotifications($checkoutable): bool
{ {
return in_array(get_class($checkoutable), $this->skipNotificationsFor); return in_array(get_class($checkoutable), $this->skipNotificationsFor);
//checkoutabale is a HUGE json array //$checkoutabale is a HUGE json array
//$this->>skipNotificationsFor = App/Model/Component | from the top of this Listener
//private array $skipNotificationsFor = [
// Component::class,
// ];
} }
private function shouldSendWebhookNotification(): bool private function shouldSendWebhookNotification(): bool

View file

@ -82,8 +82,7 @@ class CheckoutAssetNotification extends Notification
/** /**
* Only send notifications to users that have email addresses * Only send notifications to users that have email addresses
*/ */
if ($this->target instanceof User && (($this->target->email != '') || $this->settings->admin_cc_email != '')) { if ($this->target instanceof User && ($this->target->email != '') || ($this->settings->admin_cc_email != '')) {
/** /**
* Send an email if the asset requires acceptance, * Send an email if the asset requires acceptance,
* so the user can accept or decline the asset * so the user can accept or decline the asset

View file

@ -26,7 +26,7 @@ class EmailNotificationsUponCheckoutTest extends TestCase
$user = User::factory()->create(); $user = User::factory()->create();
$asset = Asset::factory()->assignedToUser($user)->create(); $asset = Asset::factory()->assignedToUser($user)->create();
$asset->model->category->update(['checkout_email' => true]); $asset->model->category->update(['checkin_email' => true]);
$this->fireCheckOutEvent($asset, $user); $this->fireCheckOutEvent($asset, $user);
@ -43,7 +43,7 @@ class EmailNotificationsUponCheckoutTest extends TestCase
$user = User::factory()->create(); $user = User::factory()->create();
$asset = Asset::factory()->assignedToUser($user)->create(); $asset = Asset::factory()->assignedToUser($user)->create();
$asset->model->category->update(['checkout_email' => false]); $asset->model->category->update(['checkin_email' => false]); //this is a 0 so the setting IS disabled
$this->fireCheckOutEvent($asset, $user); $this->fireCheckOutEvent($asset, $user);