Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Controller/Reseller/WalletsTest.php
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | public function testShow(): void | ||||
$this->assertSame('CHF', $json['currency']); | $this->assertSame('CHF', $json['currency']); | ||||
$this->assertSame($wallet->balance, $json['balance']); | $this->assertSame($wallet->balance, $json['balance']); | ||||
$this->assertSame(0, $json['discount']); | $this->assertSame(0, $json['discount']); | ||||
$this->assertTrue(empty($json['description'])); | $this->assertTrue(empty($json['description'])); | ||||
$this->assertTrue(empty($json['discount_description'])); | $this->assertTrue(empty($json['discount_description'])); | ||||
$this->assertTrue(!empty($json['provider'])); | $this->assertTrue(!empty($json['provider'])); | ||||
$this->assertTrue(empty($json['providerLink'])); | $this->assertTrue(empty($json['providerLink'])); | ||||
$this->assertTrue(!empty($json['mandate'])); | $this->assertTrue(!empty($json['mandate'])); | ||||
$this->assertTrue(!empty($json['notice'])); | |||||
// Reseller from a different tenant | // Reseller from a different tenant | ||||
\config(['app.tenant_id' => 2]); | \config(['app.tenant_id' => 2]); | ||||
$response = $this->actingAs($reseller2)->get("api/v4/wallets/{$wallet->id}"); | $response = $this->actingAs($reseller2)->get("api/v4/wallets/{$wallet->id}"); | ||||
$response->assertStatus(404); | $response->assertStatus(404); | ||||
} | } | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 224 Lines • Show Last 20 Lines |