Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Controller/UsersTest.php
Show First 20 Lines • Show All 503 Lines • ▼ Show 20 Lines | public function testStatusInfo(): void | ||||
// Test 'skus' property | // Test 'skus' property | ||||
$user->assignSku(Sku::withEnvTenantContext()->where('title', 'beta')->first()); | $user->assignSku(Sku::withEnvTenantContext()->where('title', 'beta')->first()); | ||||
$result = UsersController::statusInfo($user); | $result = UsersController::statusInfo($user); | ||||
$this->assertSame(['beta'], $result['skus']); | $this->assertSame(['beta'], $result['skus']); | ||||
$user->assignSku(Sku::withEnvTenantContext()->where('title', 'meet')->first()); | $user->assignSku(Sku::withEnvTenantContext()->where('title', 'groupware')->first()); | ||||
$result = UsersController::statusInfo($user); | $result = UsersController::statusInfo($user); | ||||
$this->assertSame(['beta', 'meet'], $result['skus']); | $this->assertSame(['beta', 'groupware'], $result['skus']); | ||||
$user->assignSku(Sku::withEnvTenantContext()->where('title', 'meet')->first()); | |||||
$result = UsersController::statusInfo($user); | |||||
$this->assertSame(['beta', 'meet'], $result['skus']); | |||||
} | } | ||||
/** | /** | ||||
* Test user config update (POST /api/v4/users/<user>/config) | * Test user config update (POST /api/v4/users/<user>/config) | ||||
*/ | */ | ||||
public function testSetConfig(): void | public function testSetConfig(): void | ||||
{ | { | ||||
$jack = $this->getTestUser('jack@kolab.org'); | $jack = $this->getTestUser('jack@kolab.org'); | ||||
▲ Show 20 Lines • Show All 986 Lines • Show Last 20 Lines |