tests: fix user search tests
This commit is contained in:
parent
568479bcfd
commit
b05a4c71ce
1 changed files with 15 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue