login()->loginNami()->withoutExceptionHandling(); $invoice = Invoice::factory()->has(InvoicePosition::factory()->withMember(), 'positions')->create(); $this->delete(route('invoice.destroy', ['invoice' => $invoice]))->assertOk(); $this->assertDatabaseCount('invoices', 0); $this->assertDatabaseCount('invoice_positions', 0); });