mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-22 16:30:34 +01:00
fix test again
This commit is contained in:
@@ -925,8 +925,10 @@ describe('User', function () {
|
|||||||
socketUser.setModerationNote({ uid: adminUid }, { uid: testUid, note: 'this is a test user' }, function (err) {
|
socketUser.setModerationNote({ uid: adminUid }, { uid: testUid, note: 'this is a test user' }, function (err) {
|
||||||
assert.ifError(err);
|
assert.ifError(err);
|
||||||
db.getSortedSetRevRange('uid:' + testUid + ':moderation:notes', 0, 0, function (err, notes) {
|
db.getSortedSetRevRange('uid:' + testUid + ':moderation:notes', 0, 0, function (err, notes) {
|
||||||
notes = JSON.parse(notes);
|
|
||||||
assert.ifError(err);
|
assert.ifError(err);
|
||||||
|
notes = notes.map(function (noteData) {
|
||||||
|
return JSON.parse(noteData);
|
||||||
|
});
|
||||||
assert.equal(notes[0].note, 'this is a test user');
|
assert.equal(notes[0].note, 'this is a test user');
|
||||||
assert.equal(notes[0].uid, adminUid);
|
assert.equal(notes[0].uid, adminUid);
|
||||||
assert(notes[0].timestamp);
|
assert(notes[0].timestamp);
|
||||||
|
|||||||
Reference in New Issue
Block a user