Fix assertion

This commit is contained in:
Marcus Moore 2024-05-22 13:15:51 -07:00
parent 1935a4aca3
commit 5d368990dc
No known key found for this signature in database

View file

@ -105,7 +105,7 @@ class AssetCheckoutTest extends TestCase
return [
'checkout_type' => 'asset',
'target' => $asset,
'expected_location' => $rtdLocation,
'expected_location' => null,
];
}
],
@ -158,12 +158,15 @@ class AssetCheckoutTest extends TestCase
$asset->refresh();
$this->assertTrue($asset->assignedTo()->is($target));
$this->assertTrue($asset->location->is($expectedLocation));
$this->assertEquals('Changed Name', $asset->name);
$this->assertTrue($asset->assetstatus->is($newStatus));
$this->assertEquals('2024-04-01 00:00:00', $asset->last_checkout);
$this->assertEquals('2024-04-08 00:00:00', (string)$asset->expected_checkin);
$expectedLocation
? $this->assertTrue($asset->location->is($expectedLocation))
: $this->assertNull($asset->location);
Event::assertDispatched(CheckoutableCheckedOut::class, 1);
Event::assertDispatched(function (CheckoutableCheckedOut $event) use ($admin, $asset, $target) {
return $event->checkoutable->is($asset)