From ad54b174a4a8800c31fadfe891312c3efb4864cf Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 16 Feb 2021 12:18:25 -0500 Subject: [PATCH] test: topic reordering tests --- public/openapi/write.yaml | 2 ++ test/api.js | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/public/openapi/write.yaml b/public/openapi/write.yaml index 8b2592412d..daefcc856f 100644 --- a/public/openapi/write.yaml +++ b/public/openapi/write.yaml @@ -100,6 +100,8 @@ paths: $ref: 'write/topics/tid/tags.yaml' /topics/{tid}/thumbs: $ref: 'write/topics/tid/thumbs.yaml' + /topics/{tid}/thumbs/order: + $ref: 'write/topics/tid/thumbs/order.yaml' /topics/{tid}/events: $ref: 'write/topics/tid/events.yaml' /posts/{pid}: diff --git a/test/api.js b/test/api.js index 0d5b3fe5ee..d2aca84943 100644 --- a/test/api.js +++ b/test/api.js @@ -176,6 +176,12 @@ describe('API', async () => { fs.closeSync(fs.openSync(path.resolve(nconf.get('upload_path'), 'files/test.txt'), 'w')); fs.closeSync(fs.openSync(path.resolve(nconf.get('upload_path'), 'files/test.png'), 'w')); + // Associate thumb with topic to test thumb reordering + await topics.thumbs.associate({ + id: 2, + path: 'files/test.png', + }); + const socketUser = require('../src/socket.io/user'); const socketAdmin = require('../src/socket.io/admin'); // export data for admin user