Use correct id

This commit is contained in:
Marcus Moore 2024-12-17 10:31:35 -08:00
parent 1be7508340
commit a53976967a
No known key found for this signature in database
2 changed files with 8 additions and 2 deletions

View file

@ -25,8 +25,10 @@ class AccessoryCheckinTest extends TestCase
public function testPageRenders() public function testPageRenders()
{ {
$accessory = Accessory::factory()->checkedOutToUser()->create();
$this->actingAs(User::factory()->superuser()->create()) $this->actingAs(User::factory()->superuser()->create())
->get(route('accessories.checkin.show', Accessory::factory()->checkedOutToUser()->create()->id)) ->get(route('accessories.checkin.show', $accessory->checkouts->first()->id))
->assertOk(); ->assertOk();
} }

View file

@ -24,8 +24,12 @@ class ComponentCheckinTest extends TestCase
public function testPageRenders() public function testPageRenders()
{ {
$component = Component::factory()->checkedOutToAsset()->create();
$componentAsset = DB::table('components_assets')->where('component_id', $component->id)->first();
$this->actingAs(User::factory()->superuser()->create()) $this->actingAs(User::factory()->superuser()->create())
->get(route('components.checkin.show', Component::factory()->checkedOutToAsset()->create()->id)) ->get(route('components.checkin.show', $componentAsset->id))
->assertOk(); ->assertOk();
} }