test: fix moderation note test

This commit is contained in:
Barış Soner Uşaklı
2024-04-23 13:31:35 -04:00
parent c73f759cf1
commit fed5165ffb

View File

@@ -1683,7 +1683,7 @@ describe('User', () => {
await setTimeout(50);
await socketUser.setModerationNote({ uid: adminUid }, { uid: testUid, note: '<svg/onload=alert(document.location);//' });
const notes = await User.getModerationNotes(testUid, 0, -1);
assert.equal(notes[0].note, '&lt;svg&#x2F;onload=alert(document.location);&#x2F;&#x2F;');
assert.equal(notes[0].note, '');
assert.equal(notes[0].uid, adminUid);
assert.equal(notes[1].note, 'this is a test user');
assert(notes[0].timestamp);