Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Controller/Admin/UsersTest.php
Show First 20 Lines • Show All 188 Lines • ▼ Show 20 Lines | public function testIndex(): void | ||||
$json = $response->json(); | $json = $response->json(); | ||||
$this->assertSame(1, $json['count']); | $this->assertSame(1, $json['count']); | ||||
$this->assertCount(1, $json['list']); | $this->assertCount(1, $json['list']); | ||||
$this->assertSame($user->id, $json['list'][0]['id']); | $this->assertSame($user->id, $json['list'][0]['id']); | ||||
$this->assertSame($user->email, $json['list'][0]['email']); | $this->assertSame($user->email, $json['list'][0]['email']); | ||||
// Search by shared folder email | |||||
$response = $this->actingAs($admin)->get("api/v4/users?search=folder-event@kolab.org"); | |||||
$response->assertStatus(200); | |||||
$json = $response->json(); | |||||
$this->assertSame(1, $json['count']); | |||||
$this->assertCount(1, $json['list']); | |||||
$this->assertSame($user->id, $json['list'][0]['id']); | |||||
$this->assertSame($user->email, $json['list'][0]['email']); | |||||
// Deleted users/domains | // Deleted users/domains | ||||
$domain = $this->getTestDomain('testsearch.com', ['type' => \App\Domain::TYPE_EXTERNAL]); | $domain = $this->getTestDomain('testsearch.com', ['type' => \App\Domain::TYPE_EXTERNAL]); | ||||
$user = $this->getTestUser('test@testsearch.com'); | $user = $this->getTestUser('test@testsearch.com'); | ||||
$plan = \App\Plan::where('title', 'group')->first(); | $plan = \App\Plan::where('title', 'group')->first(); | ||||
$user->assignPlan($plan, $domain); | $user->assignPlan($plan, $domain); | ||||
$user->setAliases(['alias@testsearch.com']); | $user->setAliases(['alias@testsearch.com']); | ||||
$wallet = $user->wallets()->first(); | $wallet = $user->wallets()->first(); | ||||
▲ Show 20 Lines • Show All 297 Lines • Show Last 20 Lines |