A free open source IT asset/license management system
Implement test
Marcus Moore559d8cc0dbea
diff --git a/tests/Feature/Notifications/Email/BulkCheckoutEmailTest.php b/tests/Feature/Notifications/Email/BulkCheckoutEmailTest.phpindex aeb9fe0d65..85aaa1d65d 100644--- a/tests/Feature/Notifications/Email/BulkCheckoutEmailTest.php+++ b/tests/Feature/Notifications/Email/BulkCheckoutEmailTest.php@@ -115,6 +115,27 @@ class BulkCheckoutEmailTest extends TestCaseMail::assertNotSent(BulkAssetCheckoutMail::class);}+ public function test_email_is_not_sent_to_cc_address_if_assets_do_not_require_acceptance()+ {+ $this->settings->enableAdminCC('[email protected]');+ $this->settings->disableAdminCCAlways();++ $this->assets = Asset::factory()->count(2)->create();++ $category = Category::factory()+ ->doesNotRequireAcceptance()+ ->doesNotSendCheckinEmail()+ ->withNoLocalOrGlobalEula()+ ->create();++ $this->assets->each(fn($asset) => $asset->model->category()->associate($category)->save());++ $this->sendRequest();++ Mail::assertNotSent(CheckoutAssetMail::class);+ Mail::assertNotSent(BulkAssetCheckoutMail::class);+ }+public function test_email_is_sent_when_assets_do_not_require_acceptance_but_have_a_eula(){$this->assets = Asset::factory()->count(2)->create();@@ -184,19 +205,6 @@ class BulkCheckoutEmailTest extends TestCase});}- public function test_email_is_not_sent_to_cc_address_when_assets_do_not_require_acceptance()- {- $this->settings->enableAdminCC('[email protected]');- $this->settings->disableAdminCCAlways();-- $this->assets = Asset::factory()->count(2)->create();-- $this->sendRequest();-- Mail::assertNotSent(CheckoutAssetMail::class);- Mail::assertNotSent(BulkAssetCheckoutMail::class);- }-public function test_email_is_sent_to_cc_address_when_assets_do_not_require_acceptance_but_admin_cc_always_enabled(){$this->settings->enableAdminCC('[email protected]');