1
0
Fork 0
mirror of synced 2024-09-30 09:18:14 +13:00

tests: fix user search tests

This commit is contained in:
Torsten Dittmann 2022-02-21 21:53:23 +00:00
parent 568479bcfd
commit b05a4c71ce

View file

@ -149,7 +149,21 @@ trait UsersBase
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()), [
'search' => 'manchester-united.co.uk'
'search' => '*united.co.uk'
]);
$this->assertEquals($response['headers']['status-code'], 200);
$this->assertIsArray($response['body']);
$this->assertIsArray($response['body']['users']);
$this->assertIsInt($response['body']['sum']);
$this->assertEquals(1, $response['body']['sum']);
$this->assertCount(1, $response['body']['users']);
$response = $this->client->call(Client::METHOD_GET, '/users', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()), [
'search' => '*manchester*'
]);
$this->assertEquals($response['headers']['status-code'], 200);