File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -99,13 +99,6 @@ public function testListUsers(array $data): void
99
99
100
100
$ this ->assertEquals ($ response ['body ' ]['users ' ][0 ]['$id ' ], $ data ['userId ' ]);
101
101
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
-
109
102
/**
110
103
* Test for SUCCESS searchUsers
111
104
*/
@@ -170,6 +163,18 @@ public function testListUsers(array $data): void
170
163
$ this ->assertNotEmpty ($ response ['body ' ]['users ' ]);
171
164
$ this ->assertCount (1 , $ response ['body ' ]['users ' ]);
172
165
$ 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 ' ]);
173
178
}
174
179
175
180
/**
You can’t perform that action at this time.
0 commit comments