Node.js based forum software built for the modern web
test: disable post queue when testing posting logic
Julian Lam9bfce68b5eea
diff --git a/test/topics.js b/test/topics.jsindex eaae7d76c7..023b737bf3 100644--- a/test/topics.js+++ b/test/topics.js@@ -54,6 +54,14 @@ describe('Topic\'s', () => {});describe('.post', () => {+ before(() => {+ meta.config.postQueue = 0;+ });++ after(() => {+ meta.config.postQueue = 1;+ });+it('should fail to create topic with invalid data', async () => {try {await apiTopics.create({ uid: 0 }, null);@@ -2337,6 +2345,12 @@ describe('Topic\'s', () => {content: 'The content of scheduled test topic',timestamp: new Date(Date.now() + 86400000).getTime(),};++ meta.config.postQueue = 0;+ });++ after(() => {+ meta.config.postQueue = 1;});it('should create a scheduled topic as pinned, deleted, included in "topics:scheduled" zset and with a timestamp in future', async () => {