mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
test: fix broken test
This commit is contained in:
@@ -131,7 +131,6 @@ Categories.getModeratorUids = async function (cids) {
|
||||
|
||||
return _.uniq(sets.uids[index].concat(_.flatten(sets.groupNames[index].map(g => map[g]))));
|
||||
});
|
||||
console.log('what', moderatorUids);
|
||||
return moderatorUids;
|
||||
};
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ const cache = require('../cache');
|
||||
module.exports = function (Categories) {
|
||||
Categories.update = async function (modified) {
|
||||
const cids = Object.keys(modified);
|
||||
console.log('updating', cids);
|
||||
await Promise.all(cids.map(cid => updateCategory(cid, modified[cid])));
|
||||
return cids;
|
||||
};
|
||||
|
||||
@@ -826,7 +826,7 @@ describe('Categories', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe.only('Categories.getModeratorUids', () => {
|
||||
describe('Categories.getModeratorUids', () => {
|
||||
let cid;
|
||||
|
||||
before(async () => {
|
||||
@@ -865,7 +865,8 @@ describe('Categories', () => {
|
||||
const payload = {};
|
||||
payload[cid] = { disabled: 1 };
|
||||
await Categories.update(payload);
|
||||
const uids = await Categories.getModeratorUids([1, 2]);
|
||||
const uids = await Categories.getModeratorUids([cid, 2]);
|
||||
console.log(uids);
|
||||
assert(!uids[0].includes('1'));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user