create(); $otherUser = User::factory()->create(); $invoice = Invoice::factory()->for($owner, 'user')->create([ 'status' => 'draft', ]); $this->actingAs($otherUser) ->patchJson('/api/invoices/'.$invoice->getKey(), ['status' => 'paid']) ->assertForbidden(); expect($invoice->refresh()->status)->toBe('draft'); });