Scaffold additional tests

This commit is contained in:
Marcus Moore 2024-02-13 12:15:59 -08:00
parent 307b39bd38
commit 852b0b3f11
No known key found for this signature in database
2 changed files with 42 additions and 2 deletions

View file

@ -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();

View file

@ -24,13 +24,23 @@ class AssetCheckinTest extends TestCase
->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));