Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Controller/UsersTest.php
Show First 20 Lines • Show All 277 Lines • ▼ Show 20 Lines | public function testShow(): void | ||||
$storage_sku = Sku::where('title', 'storage')->first(); | $storage_sku = Sku::where('title', 'storage')->first(); | ||||
$groupware_sku = Sku::where('title', 'groupware')->first(); | $groupware_sku = Sku::where('title', 'groupware')->first(); | ||||
$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(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(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(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']); | |||||
} | } | ||||
/** | /** | ||||
* 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) | ||||
* | * | ||||
* @group imap | * @group imap | ||||
* @group dns | * @group dns | ||||
▲ Show 20 Lines • Show All 970 Lines • Show Last 20 Lines |