feat: DELETE /api/v3/chats/:roomId/users and DELETE /api/v3/chats/:roomId/users/:uid

This commit is contained in:
Julian Lam
2021-12-22 09:58:52 -05:00
parent 6294beea0b
commit fe17c94c35
9 changed files with 121 additions and 19 deletions

View File

@@ -390,6 +390,7 @@ describe('API', async () => {
try {
if (type === 'json') {
console.log(`calling ${url}`);
response = await request(url, {
method: method,
jar: !unauthenticatedRoutes.includes(path) ? jar : undefined,
@@ -418,7 +419,12 @@ describe('API', async () => {
it('response status code should match one of the schema defined responses', () => {
// HACK: allow HTTP 418 I am a teapot, for now 👇
assert(context[method].responses.hasOwnProperty('418') || Object.keys(context[method].responses).includes(String(response.statusCode)), `${method.toUpperCase()} ${path} sent back unexpected HTTP status code: ${response.statusCode}`);
try {
assert(context[method].responses.hasOwnProperty('418') || Object.keys(context[method].responses).includes(String(response.statusCode)), `${method.toUpperCase()} ${path} sent back unexpected HTTP status code: ${response.statusCode}`);
} catch (e) {
console.log(response.body);
throw e;
}
});
// Recursively iterate through schema properties, comparing type