Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Controller/WalletsTest.php
Show First 20 Lines • Show All 174 Lines • ▼ Show 20 Lines | public function testReceipts(): void | ||||
$payment = Payment::create([ | $payment = Payment::create([ | ||||
'id' => 'AAA1', | 'id' => 'AAA1', | ||||
'status' => PaymentProvider::STATUS_PAID, | 'status' => PaymentProvider::STATUS_PAID, | ||||
'type' => PaymentProvider::TYPE_ONEOFF, | 'type' => PaymentProvider::TYPE_ONEOFF, | ||||
'description' => 'Paid in April', | 'description' => 'Paid in April', | ||||
'wallet_id' => $wallet->id, | 'wallet_id' => $wallet->id, | ||||
'provider' => 'stripe', | 'provider' => 'stripe', | ||||
'amount' => 1111, | 'amount' => 1111, | ||||
'credit_amount' => 1111, | |||||
'currency' => 'CHF', | 'currency' => 'CHF', | ||||
'currency_amount' => 1111, | 'currency_amount' => 1111, | ||||
]); | ]); | ||||
$payment->updated_at = $date; | $payment->updated_at = $date; | ||||
$payment->save(); | $payment->save(); | ||||
$response = $this->actingAs($user)->get("api/v4/wallets/{$wallet->id}/receipts"); | $response = $this->actingAs($user)->get("api/v4/wallets/{$wallet->id}/receipts"); | ||||
$response->assertStatus(200); | $response->assertStatus(200); | ||||
▲ Show 20 Lines • Show All 166 Lines • Show Last 20 Lines |