Node.js based forum software built for the modern web
test: one more test fix
Barış Soner Uşaklı22d1972f83f8
diff --git a/public/openapi/write/chats/roomId/messages/mid.yaml b/public/openapi/write/chats/roomId/messages/mid.yamlindex dfa06e7811..c899627802 100644--- a/public/openapi/write/chats/roomId/messages/mid.yaml+++ b/public/openapi/write/chats/roomId/messages/mid.yaml@@ -49,7 +49,7 @@ put:type: numberrequired: truedescription: a valid message id- example: 3+ example: 2requestBody:required: truecontent:@@ -92,7 +92,7 @@ delete:type: numberrequired: truedescription: a valid message id- example: 3+ example: 2responses:'200':description: Message successfully deleted@@ -125,7 +125,7 @@ post:type: numberrequired: truedescription: a valid message id- example: 3+ example: 2responses:'200':description: message successfully restoreddiff --git a/public/openapi/write/chats/roomId/messages/mid/ip.yaml b/public/openapi/write/chats/roomId/messages/mid/ip.yamlindex 1730542213..2c2af8fb1b 100644--- a/public/openapi/write/chats/roomId/messages/mid/ip.yaml+++ b/public/openapi/write/chats/roomId/messages/mid/ip.yaml@@ -17,7 +17,7 @@ get:type: stringrequired: truedescription: a valid chat message id- example: 3+ example: 2responses:'200':description: Chat message ip address retrieveddiff --git a/test/api.js b/test/api.jsindex f7616904c8..fbb36b24b8 100644--- a/test/api.js+++ b/test/api.js@@ -282,8 +282,13 @@ describe('API', async () => {await flags.appendNote(flagId, 1, 'test note', 1626446956652);await flags.create('post', 2, unprivUid, 'sample reasons', Date.now()); // for testing flag notes (since flag 1 deleted)- // Create a new chat room- await messaging.newRoom(adminUid, { uids: [unprivUid] });+ // Create a new chat room & send a message+ const roomId = await messaging.newRoom(adminUid, { uids: [unprivUid] });+ await messaging.sendMessage({+ roomId,+ uid: adminUid,+ content: 'this is a chat message',+ });// Create an empty file to test DELETE /files and thumb deletionfs.closeSync(fs.openSync(path.resolve(nconf.get('upload_path'), 'files/test.txt'), 'w'));