Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Controller/WalletsTest.php
Show First 20 Lines • Show All 203 Lines • ▼ Show 20 Lines | public function testShow(): void | ||||
$response->assertStatus(200); | $response->assertStatus(200); | ||||
$json = $response->json(); | $json = $response->json(); | ||||
$this->assertSame($wallet->id, $json['id']); | $this->assertSame($wallet->id, $json['id']); | ||||
$this->assertSame('CHF', $json['currency']); | $this->assertSame('CHF', $json['currency']); | ||||
$this->assertSame($wallet->balance, $json['balance']); | $this->assertSame($wallet->balance, $json['balance']); | ||||
$this->assertTrue(empty($json['description'])); | $this->assertTrue(empty($json['description'])); | ||||
// TODO: This assertion does not work after a longer while from seeding | |||||
$this->assertTrue(!empty($json['notice'])); | $this->assertTrue(!empty($json['notice'])); | ||||
} | } | ||||
/** | /** | ||||
* Test fetching wallet transactions | * Test fetching wallet transactions | ||||
*/ | */ | ||||
public function testTransactions(): void | public function testTransactions(): void | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 117 Lines • Show Last 20 Lines |