Fixed tests

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-08-10 16:55:48 +01:00
parent 6294516271
commit 07b1e3fb90
2 changed files with 5 additions and 5 deletions

View file

@ -61,7 +61,7 @@ class StoreAssetTest extends TestCase
$asset = Asset::find($response['payload']['id']); $asset = Asset::find($response['payload']['id']);
$this->assertTrue($asset->adminuser->is($user)); $this->assertTrue($asset->admin->is($user));
$this->assertEquals('2024-06-02', $asset->asset_eol_date); $this->assertEquals('2024-06-02', $asset->asset_eol_date);
$this->assertEquals('random_string', $asset->asset_tag); $this->assertEquals('random_string', $asset->asset_tag);
@ -456,7 +456,7 @@ class StoreAssetTest extends TestCase
$asset = Asset::find($response['payload']['id']); $asset = Asset::find($response['payload']['id']);
$this->assertTrue($asset->adminuser->is($user)); $this->assertTrue($asset->admin->is($user));
$this->assertTrue($asset->checkedOutToUser()); $this->assertTrue($asset->checkedOutToUser());
$this->assertTrue($asset->assignedTo->is($userAssigned)); $this->assertTrue($asset->assignedTo->is($userAssigned));
} }
@ -482,7 +482,7 @@ class StoreAssetTest extends TestCase
$asset = Asset::find($response['payload']['id']); $asset = Asset::find($response['payload']['id']);
$this->assertTrue($asset->adminuser->is($user)); $this->assertTrue($asset->admin->is($user));
$this->assertTrue($asset->checkedOutToLocation()); $this->assertTrue($asset->checkedOutToLocation());
$this->assertTrue($asset->location->is($location)); $this->assertTrue($asset->location->is($location));
} }
@ -508,7 +508,7 @@ class StoreAssetTest extends TestCase
$apiAsset = Asset::find($response['payload']['id']); $apiAsset = Asset::find($response['payload']['id']);
$this->assertTrue($apiAsset->adminuser->is($user)); $this->assertTrue($apiAsset->admin->is($user));
$this->assertTrue($apiAsset->checkedOutToAsset()); $this->assertTrue($apiAsset->checkedOutToAsset());
// I think this makes sense, but open to a sanity check // I think this makes sense, but open to a sanity check
$this->assertTrue($asset->assignedAssets()->find($response['payload']['id'])->is($apiAsset)); $this->assertTrue($asset->assignedAssets()->find($response['payload']['id'])->is($apiAsset));

View file

@ -165,7 +165,7 @@ class BulkEditAssetsTest extends TestCase
}); });
} }
public function testBulkEditAssetsRequiresAdminUserToUpdateEncryptedCustomFields() public function testBulkEditAssetsRequiresadminToUpdateEncryptedCustomFields()
{ {
$this->markIncompleteIfMySQL('Custom Fields tests do not work on mysql'); $this->markIncompleteIfMySQL('Custom Fields tests do not work on mysql');
$edit_user = User::factory()->editAssets()->create(); $edit_user = User::factory()->editAssets()->create();