Skip to content

A free open source IT asset/license management system

Scaffold tests

Marcus Mooreb28839d907db
diff --git a/tests/Feature/Notifications/Email/EmailNotificationsUponCheckoutTest.php b/tests/Feature/Notifications/Email/EmailNotificationsUponCheckoutTest.php
index a1f701192e..02efb0c432 100644
--- a/tests/Feature/Notifications/Email/EmailNotificationsUponCheckoutTest.php
+++ b/tests/Feature/Notifications/Email/EmailNotificationsUponCheckoutTest.php
@@ -77,7 +77,32 @@ class EmailNotificationsUponCheckoutTest extends TestCase
$this->assertUserReceivedEmail();
}
- public function test_admin_cc_email_still_sent_when_category_is_not_set_to_send_email_to_user()
+ public function test_handles_user_not_having_email_address_set()
+ {
+ $this->markTestIncomplete();
+
+ $this->category->update(['checkin_email' => true]);
+ $this->user->update(['email' => null]);
+
+ $this->fireCheckoutEvent();
+ }
+
+ public function test_sends_alert_email()
+ {
+ $this->markTestIncomplete();
+
+ $this->settings->enableAdminCC('[email protected]');
+
+ $this->category->update(['checkin_email' => true]);
+
+ $this->fireCheckoutEvent();
+
+ Mail::assertSent(CheckoutAssetMail::class, function ($mail) {
+ return $mail->hasTo('[email protected]');
+ });
+ }
+
+ public function test_alert_email_still_sent_when_category_is_not_set_to_send_email_to_user()
{
$this->settings->enableAdminCC('[email protected]');