withoutExceptionHandling()->login()->loginNami(); $member = Member::factory() ->has(InvoicePosition::factory()->for(Invoice::factory()->status(InvoiceStatus::SENT))->description('lala b')->price(5566)) ->defaults()->create(); $this->get(route('member.invoice-position.index', ['member' => $member])) ->assertJsonPath('data.0.description', 'lala b') ->assertJsonPath('data.0.price_human', '55,66 €') ->assertJsonPath('data.0.id', $member->invoicePositions->first()->id) ->assertJsonPath('data.0.invoice.status', 'Rechnung gestellt'); } }