mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 04:21:17 +01:00
fix moderation note test
This commit is contained in:
@@ -924,9 +924,11 @@ describe('User', function () {
|
||||
assert.ifError(err);
|
||||
socketUser.setModerationNote({ uid: adminUid }, { uid: testUid, note: 'this is a test user' }, function (err) {
|
||||
assert.ifError(err);
|
||||
User.getUserField(testUid, 'moderationNote', function (err, note) {
|
||||
db.getSortedSetRevRange('uid:' + testUid + ':moderation:notes', 0, 0, function (err, notes) {
|
||||
notes = JSON.parse(notes);
|
||||
assert.ifError(err);
|
||||
assert.equal(note, 'this is a test user');
|
||||
assert.equal(notes[0].note, 'this is a test user');
|
||||
assert(notes[0].timestamp);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user