A free open source IT asset/license management system
Use correct id
Marcus Moorea53976967aeb
diff --git a/tests/Feature/Checkins/Ui/AccessoryCheckinTest.php b/tests/Feature/Checkins/Ui/AccessoryCheckinTest.phpindex 75df0a0a11..a8572c6186 100644--- a/tests/Feature/Checkins/Ui/AccessoryCheckinTest.php+++ b/tests/Feature/Checkins/Ui/AccessoryCheckinTest.php@@ -25,8 +25,10 @@ class AccessoryCheckinTest extends TestCasepublic function testPageRenders(){+ $accessory = Accessory::factory()->checkedOutToUser()->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();}diff --git a/tests/Feature/Checkins/Ui/ComponentCheckinTest.php b/tests/Feature/Checkins/Ui/ComponentCheckinTest.phpindex 6ca921d0dd..6c2ef084fc 100644--- a/tests/Feature/Checkins/Ui/ComponentCheckinTest.php+++ b/tests/Feature/Checkins/Ui/ComponentCheckinTest.php@@ -24,8 +24,12 @@ class ComponentCheckinTest extends TestCasepublic function testPageRenders(){+ $component = Component::factory()->checkedOutToAsset()->create();++ $componentAsset = DB::table('components_assets')->where('component_id', $component->id)->first();+$this->actingAs(User::factory()->superuser()->create())- ->get(route('components.checkin.show', Component::factory()->checkedOutToAsset()->create()->id))+ ->get(route('components.checkin.show', $componentAsset->id))->assertOk();}