Skip to content

Commit

Permalink
Scaffold additional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusmoore committed Feb 13, 2024
1 parent 307b39b commit 852b0b3
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
30 changes: 30 additions & 0 deletions tests/Feature/Api/Assets/AssetCheckinTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
14 changes: 12 additions & 2 deletions tests/Feature/Checkins/AssetCheckinTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit 852b0b3

Please sign in to comment.