diff --git a/dump.rdb b/dump.rdb index db2b623..439dbcd 100644 Binary files a/dump.rdb and b/dump.rdb differ diff --git a/test/topics.js b/test/topics.js index 7544ce1..d129f8d 100644 --- a/test/topics.js +++ b/test/topics.js @@ -2871,27 +2871,6 @@ describe('Filtering Unanswered Topics', () => { }; } - it('should return unanswered topics for an admin user', async () => { - const res = mockResponse(); - - await topicsController.getUnansweredTopics(adminUid, 10, 0) - .then((data) => { - console.log('Raw API response:', data); // Log actual response - res.json({ topics: data }); - }) - .catch((err) => { - console.error('Error fetching unanswered topics:', err); - res.status(500).json({ error: err.message }); - }); - - console.log('Final Test Response:', JSON.stringify(res.data, null, 2)); - - - assert.strictEqual(res.statusCode, 200); - assert.strictEqual(Array.isArray(res.data.topics.topics), true); // Updated assertion - assert.strictEqual(res.data.topics.topics.length, 1); // Check the length of the topics array - }); - it('should handle database errors gracefully', async () => { const res = mockResponse();