A free open source IT asset/license management system
WIP
Marcus Moore503e6898c360
diff --git a/tests/Feature/Checkouts/Ui/BulkAssetCheckoutTest.php b/tests/Feature/Checkouts/Ui/BulkAssetCheckoutTest.phpindex 07a9da7a6b..894abb0a88 100644--- a/tests/Feature/Checkouts/Ui/BulkAssetCheckoutTest.php+++ b/tests/Feature/Checkouts/Ui/BulkAssetCheckoutTest.php@@ -36,7 +36,7 @@ class BulkAssetCheckoutTest extends TestCase{Mail::fake();- Event::fake();+ Event::fake([CheckoutablesCheckedOutInBulk::class]);$assets = Asset::factory()->requiresAcceptance()->count(2)->create();$user = User::factory()->create(['email' => '[email protected]']);@@ -61,7 +61,6 @@ class BulkAssetCheckoutTest extends TestCaseEvent::assertDispatched(CheckoutablesCheckedOutInBulk::class);- // @todo: move to another test case$assets->each(function ($asset) use ($expectedCheckin, $checkoutAt, $user) {$asset->assignedTo()->is($user);$asset->last_checkout = $checkoutAt;diff --git a/tests/Unit/Events/CheckoutablesCheckedOutInBulkTest.php b/tests/Unit/Events/CheckoutablesCheckedOutInBulkTest.phpindex 6c2a89ff18..63d08943e1 100644--- a/tests/Unit/Events/CheckoutablesCheckedOutInBulkTest.php+++ b/tests/Unit/Events/CheckoutablesCheckedOutInBulkTest.php@@ -4,6 +4,7 @@ namespace Tests\Unit\Events;use App\Events\CheckoutablesCheckedOutInBulk;use App\Mail\BulkAssetCheckoutMail;+use App\Models\Actionlog;use App\Models\Asset;use App\Models\User;use App\Notifications\CheckoutAssetNotification;@@ -31,20 +32,6 @@ class CheckoutablesCheckedOutInBulkTest extends TestCase$this->expected_checkin = '';}- public function test_action_log_entries()- {- $this->markTestIncomplete();-- $this->dispatchEvent();-- $this->assets->each(function ($asset) {- $asset->assignedTo()->is($this->target);- $asset->last_checkout = $this->checkout_at;- $asset->expected_checkin = $this->expected_checkin;- $this->assertHasTheseActionLogs($asset, ['create', 'checkout']); //Note: '$this' gets auto-bound in closures, so this does work.- });- }-public function test_checkout_acceptance_creation(){$this->markTestIncomplete();