1
0
Fork 0
mirror of synced 2024-07-02 05:00:33 +12:00

Add test ensuring no 500 on bad serach

This commit is contained in:
Jake Barnby 2023-09-28 18:58:29 +13:00
parent 4491975f78
commit aa1cf053f7
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -595,6 +595,18 @@ trait UsersBase
$this->assertCount(1, $response['body']['users']);
$this->assertEquals($response['body']['users'][0]['$id'], $data['userId']);
$response = $this->client->call(Client::METHOD_GET, '/users', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()), [
'search' => '>',
]);
$this->assertEquals($response['headers']['status-code'], 200);
$this->assertNotEmpty($response['body']);
$this->assertEmpty($response['body']['users']);
$this->assertCount(0, $response['body']['users']);
/**
* Test for FAILURE
*/