Skip to content

A free open source IT asset/license management system

Scaffold tests around asset check in

Marcus Moorec81bc1d2ee85
diff --git a/tests/Feature/Assets/AssetCheckinTest.php b/tests/Feature/Checkins/AssetCheckinTest.php
similarity index 53%
rename from tests/Feature/Assets/AssetCheckinTest.php
rename to tests/Feature/Checkins/AssetCheckinTest.php
index 059fb1294f..2ec5f78318 100644
--- a/tests/Feature/Assets/AssetCheckinTest.php
+++ b/tests/Feature/Checkins/AssetCheckinTest.php
@@ -1,6 +1,6 @@
<?php
-namespace Tests\Feature\Assets;
+namespace Tests\Feature\Checkins;
use App\Models\Asset;
use App\Models\User;
@@ -11,6 +11,30 @@ class AssetCheckinTest extends TestCase
{
use InteractsWithSettings;
+ public function testCheckingInAssetRequiresCorrectPermission()
+ {
+ $this->actingAs(User::factory()->create())
+ ->post(route('hardware.checkin.store', [
+ 'assetId' => Asset::factory()->assignedToUser()->create()->id,
+ ]))
+ ->assertForbidden();
+ }
+
+ public function testAssetCanBeCheckedIn()
+ {
+ $this->markTestIncomplete();
+ }
+
+ public function testCheckInEmailSentToUserIfSettingEnabled()
+ {
+ $this->markTestIncomplete();
+ }
+
+ public function testCheckInEmailNotSentToUserIfSettingDisabled()
+ {
+ $this->markTestIncomplete();
+ }
+
public function testLastCheckInFieldIsSetOnCheckin()
{
$admin = User::factory()->superuser()->create();