Skip to content

A free open source IT asset/license management system

Add test case

Marcus Moorebe69da0a0d58
diff --git a/tests/Feature/Notifications/Email/BulkCheckoutEmailTest.php b/tests/Feature/Notifications/Email/BulkCheckoutEmailTest.php
index 0e1ef6655f..a8683f021c 100644
--- a/tests/Feature/Notifications/Email/BulkCheckoutEmailTest.php
+++ b/tests/Feature/Notifications/Email/BulkCheckoutEmailTest.php
@@ -56,6 +56,21 @@ class BulkCheckoutEmailTest extends TestCase
});
}
+ public function test_email_is_not_sent_when_user_does_not_have_email_address()
+ {
+ $this->markTestIncomplete();
+
+ $this->settings->disableAdminCC();
+
+ $this->target = User::factory()->create(['email' => null]);
+
+ $this->dispatchEvent();
+
+ Mail::assertNotSent(CheckoutAssetMail::class);
+
+ Mail::assertNotSent(BulkAssetCheckoutMail::class);
+ }
+
public function test_email_is_sent_to_cc_address()
{
$this->settings->enableAdminCC('[email protected]');