A free open source IT asset/license management system
Organization
Marcus Moored8b95d3a205a
diff --git a/tests/Feature/Notifications/Email/BulkCheckoutEmailTest.php b/tests/Feature/Notifications/Email/BulkCheckoutEmailTest.phpindex 85aaa1d65d..729fa48cd1 100644--- a/tests/Feature/Notifications/Email/BulkCheckoutEmailTest.php+++ b/tests/Feature/Notifications/Email/BulkCheckoutEmailTest.php@@ -115,27 +115,6 @@ 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();@@ -223,6 +202,27 @@ class BulkCheckoutEmailTest extends TestCase});}+ 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);+ }+private function sendRequest(){$this->actingAs($this->admin)