From 852b0b3f11c170d1d99a0efc43e4d1460d92ecd1 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Tue, 13 Feb 2024 12:15:59 -0800 Subject: [PATCH] Scaffold additional tests --- tests/Feature/Api/Assets/AssetCheckinTest.php | 30 +++++++++++++++++++ tests/Feature/Checkins/AssetCheckinTest.php | 14 +++++++-- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/tests/Feature/Api/Assets/AssetCheckinTest.php b/tests/Feature/Api/Assets/AssetCheckinTest.php index f71191d80c77..7e5098bcef3b 100644 --- a/tests/Feature/Api/Assets/AssetCheckinTest.php +++ b/tests/Feature/Api/Assets/AssetCheckinTest.php @@ -11,6 +11,36 @@ class AssetCheckinTest extends TestCase { use InteractsWithSettings; + public function testCheckingInAssetRequiresCorrectPermission() + { + $this->markTestIncomplete(); + } + + public function testAssetCheckedOutToAssetCanBeCheckedIn() + { + $this->markTestIncomplete(); + } + + public function testAssetCheckedOutToLocationCanBeCheckedIn() + { + $this->markTestIncomplete(); + } + + public function testAssetCheckedOutToUserCanBeCheckedIn() + { + $this->markTestIncomplete(); + } + + public function testCheckInEmailSentToUserIfSettingEnabled() + { + $this->markTestIncomplete(); + } + + public function testCheckInEmailNotSentToUserIfSettingDisabled() + { + $this->markTestIncomplete(); + } + public function testLastCheckInFieldIsSetOnCheckin() { $admin = User::factory()->superuser()->create(); diff --git a/tests/Feature/Checkins/AssetCheckinTest.php b/tests/Feature/Checkins/AssetCheckinTest.php index d43cdfb24f37..92a8c2961564 100644 --- a/tests/Feature/Checkins/AssetCheckinTest.php +++ b/tests/Feature/Checkins/AssetCheckinTest.php @@ -24,13 +24,23 @@ public function testCheckingInAssetRequiresCorrectPermission() ->assertForbidden(); } - public function testAssetCanBeCheckedIn() + public function testAssetCheckedOutToAssetCanBeCheckedIn() + { + $this->markTestIncomplete(); + } + + public function testAssetCheckedOutToLocationCanBeCheckedIn() + { + $this->markTestIncomplete(); + } + + public function testAssetCheckedOutToUserCanBeCheckedIn() { Event::fake([CheckoutableCheckedIn::class]); $admin = User::factory()->checkinAssets()->create(); $user = User::factory()->create(); - $asset = Asset::factory()->assignedToUser($user)->create(['last_checkin' => null]); + $asset = Asset::factory()->assignedToUser($user)->create(); $this->assertTrue($asset->assignedTo->is($user));