A free open source IT asset/license management system
Send if eula is set
Marcus Moore428b51168781
diff --git a/app/Listeners/CheckoutablesCheckedOutInBulkListener.php b/app/Listeners/CheckoutablesCheckedOutInBulkListener.phpindex 1899076b70..7eef9d69c9 100644--- a/app/Listeners/CheckoutablesCheckedOutInBulkListener.php+++ b/app/Listeners/CheckoutablesCheckedOutInBulkListener.php@@ -101,8 +101,7 @@ class CheckoutablesCheckedOutInBulkListenerprivate function hasAssetWithEula(Collection $assets): bool{foreach ($assets as $asset) {- // todo: this doesn't work yet- if ($asset->eula) {+ if ($asset->getEula()) {return true;}}diff --git a/tests/Feature/Notifications/Email/BulkCheckoutEmailTest.php b/tests/Feature/Notifications/Email/BulkCheckoutEmailTest.phpindex f8516f57f0..3776ba34da 100644--- a/tests/Feature/Notifications/Email/BulkCheckoutEmailTest.php+++ b/tests/Feature/Notifications/Email/BulkCheckoutEmailTest.php@@ -109,8 +109,6 @@ class BulkCheckoutEmailTest extends TestCasepublic function test_email_is_sent_when_assets_do_not_require_acceptance_but_have_a_eula(){- // $this->markTestIncomplete();-$this->assets = Asset::factory()->doesNotRequireAcceptance()->count(2)->create();$category = Category::factory()->doesNotRequireAcceptance()->create([@@ -129,7 +127,6 @@ class BulkCheckoutEmailTest extends TestCaseMail::assertSent(BulkAssetCheckoutMail::class, function (BulkAssetCheckoutMail $mail) {return $mail->hasTo($this->target->email)&& $mail->assertSeeInText('Assets have been checked out to you')- // todo: test this properly&& $mail->assertDontSeeInText('Click here to review the terms of use and accept');});