Skip to content

Commit 66772f5

Browse files
fix tests
1 parent df661a6 commit 66772f5

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

tests/e2e/Services/Users/UsersBase.php

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,6 @@ public function testListUsers(array $data): void
9999

100100
$this->assertEquals($response['body']['users'][0]['$id'], $data['userId']);
101101

102-
$response = $this->client->call(Client::METHOD_GET, '/users', array_merge([
103-
'content-type' => 'application/json',
104-
'x-appwrite-project' => $this->getProject()['$id'],
105-
], $this->getHeaders()), [
106-
'cursor' => 'unknown'
107-
]);
108-
109102
/**
110103
* Test for SUCCESS searchUsers
111104
*/
@@ -170,6 +163,18 @@ public function testListUsers(array $data): void
170163
$this->assertNotEmpty($response['body']['users']);
171164
$this->assertCount(1, $response['body']['users']);
172165
$this->assertEquals($response['body']['users'][0]['$id'], $data['userId']);
166+
167+
/**
168+
* Test for FAILURE
169+
*/
170+
$response = $this->client->call(Client::METHOD_GET, '/users', array_merge([
171+
'content-type' => 'application/json',
172+
'x-appwrite-project' => $this->getProject()['$id'],
173+
], $this->getHeaders()), [
174+
'cursor' => 'unknown'
175+
]);
176+
177+
$this->assertEquals(400, $response['headers']['status-code']);
173178
}
174179

175180
/**

0 commit comments

Comments
 (0)