Skip to content

Node.js based forum software built for the modern web

test: fix one more test

Barış Soner Uşaklı77ccec2915e2
diff --git a/test/uploads.js b/test/uploads.js
index 6caed4115c..a30ead73d3 100644
--- a/test/uploads.js
+++ b/test/uploads.js
@@ -346,10 +346,10 @@ describe('Upload Controllers', () => {
});
});
- it('should return empty string for invalid cover:url when user profile is loaded', async () => {
+ it('should return default cover for invalid cover:url when user profile is loaded', async () => {
await user.setUserField(1, 'cover:url', 'http://example.com/"><script>alert(1)</script>');
const { body: userData } = await helpers.request('get', '/api/user/admin');
- assert.strictEqual(userData['cover:url'], '');
+ assert.strictEqual(userData['cover:url'], `${nconf.get('relative_path')}/assets/images/cover-default.png`);
});
it('should return empty string for invalid picture when user profile is loaded', async () => {