A free open source IT asset/license management system
Populate tests
Marcus Moore10be434c137f
diff --git a/tests/Feature/Notifications/Email/EmailNotificationsToAdminAlertEmailUponCheckinTest.php b/tests/Feature/Notifications/Email/EmailNotificationsToAdminAlertEmailUponCheckinTest.phpindex f2ce26e712..1bdbf0b673 100644--- a/tests/Feature/Notifications/Email/EmailNotificationsToAdminAlertEmailUponCheckinTest.php+++ b/tests/Feature/Notifications/Email/EmailNotificationsToAdminAlertEmailUponCheckinTest.php@@ -86,12 +86,32 @@ class EmailNotificationsToAdminAlertEmailUponCheckinTest extends TestCasepublic function test_admin_alert_email_sent_when_always_send_is_true_and_asset_does_not_require_acceptance(){- $this->markTestIncomplete();+ $this->settings+ ->enableAdminCC('[email protected]')+ ->enableAdminCCAlways();++ $this->category->update(['checkin_email' => false]);++ $this->fireCheckInEvent($this->asset, $this->user);++ Mail::assertSent(CheckinAssetMail::class, function ($mail) {+ return $mail->hasTo('[email protected]') || $mail->hasCc('[email protected]');+ });}public function test_admin_alert_email_not_sent_when_always_send_is_false_and_asset_does_not_require_acceptance(){- $this->markTestIncomplete();+ $this->settings+ ->enableAdminCC('[email protected]')+ ->disableAdminCCAlways();++ $this->category->update(['checkin_email' => false]);++ $this->fireCheckInEvent($this->asset, $this->user);++ Mail::assertNotSent(CheckinAssetMail::class, function ($mail) {+ return $mail->hasTo('[email protected]') || $mail->hasCc('[email protected]');+ });}private function fireCheckInEvent($asset, $user): void