Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Controller/UsersTest.php
Show First 20 Lines • Show All 279 Lines • ▼ Show 20 Lines | public function testShow(): void | ||||
$mailbox_sku = Sku::where('title', 'mailbox')->first(); | $mailbox_sku = Sku::where('title', 'mailbox')->first(); | ||||
$secondfactor_sku = Sku::where('title', '2fa')->first(); | $secondfactor_sku = Sku::where('title', '2fa')->first(); | ||||
$this->assertCount(5, $json['skus']); | $this->assertCount(5, $json['skus']); | ||||
$this->assertSame(2, $json['skus'][$storage_sku->id]['count']); | $this->assertSame(2, $json['skus'][$storage_sku->id]['count']); | ||||
$this->assertSame([0,0], $json['skus'][$storage_sku->id]['costs']); | $this->assertSame([0,0], $json['skus'][$storage_sku->id]['costs']); | ||||
$this->assertSame(1, $json['skus'][$groupware_sku->id]['count']); | $this->assertSame(1, $json['skus'][$groupware_sku->id]['count']); | ||||
$this->assertSame([555], $json['skus'][$groupware_sku->id]['costs']); | $this->assertSame([490], $json['skus'][$groupware_sku->id]['costs']); | ||||
$this->assertSame(1, $json['skus'][$mailbox_sku->id]['count']); | $this->assertSame(1, $json['skus'][$mailbox_sku->id]['count']); | ||||
$this->assertSame([444], $json['skus'][$mailbox_sku->id]['costs']); | $this->assertSame([500], $json['skus'][$mailbox_sku->id]['costs']); | ||||
$this->assertSame(1, $json['skus'][$secondfactor_sku->id]['count']); | $this->assertSame(1, $json['skus'][$secondfactor_sku->id]['count']); | ||||
$this->assertSame([0], $json['skus'][$secondfactor_sku->id]['costs']); | $this->assertSame([0], $json['skus'][$secondfactor_sku->id]['costs']); | ||||
} | } | ||||
/** | /** | ||||
* Test fetching user status (GET /api/v4/users/<user-id>/status) | * Test fetching user status (GET /api/v4/users/<user-id>/status) | ||||
* and forcing setup process update (?refresh=1) | * and forcing setup process update (?refresh=1) | ||||
* | * | ||||
▲ Show 20 Lines • Show All 971 Lines • Show Last 20 Lines |