Pass the correct variable to the route helper

This commit is contained in:
Marcus Moore 2024-02-12 16:45:18 -08:00
parent df23fd0dee
commit 7154d23759
No known key found for this signature in database

View file

@ -17,8 +17,10 @@ class AccessoryCheckinTest extends TestCase
public function testCheckingInAccessoryRequiresCorrectPermission() public function testCheckingInAccessoryRequiresCorrectPermission()
{ {
$accessory = Accessory::factory()->checkedOutToUser()->create();
$this->actingAs(User::factory()->create()) $this->actingAs(User::factory()->create())
->post(route('accessories.checkin.store', Accessory::factory()->checkedOutToUser()->create())) ->post(route('accessories.checkin.store', $accessory->users->first()->pivot->id))
->assertForbidden(); ->assertForbidden();
} }