mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-04 21:15:55 +01:00
Add more chat hooks, replace toobig.jpg (#9843)
* feat: more hooks for messaging for use in global chat plugin * fix: replace toobig.jpg toobig.png is a real 10000x10000 image
This commit is contained in:
@@ -196,11 +196,11 @@ describe('Upload Controllers', () => {
|
||||
});
|
||||
|
||||
it('should fail to upload image to post if image dimensions are too big', (done) => {
|
||||
helpers.uploadFile(`${nconf.get('url')}/api/post/upload`, path.join(__dirname, '../test/files/toobig.jpg'), {}, jar, csrf_token, (err, res, body) => {
|
||||
helpers.uploadFile(`${nconf.get('url')}/api/post/upload`, path.join(__dirname, '../test/files/toobig.png'), {}, jar, csrf_token, (err, res, body) => {
|
||||
assert.ifError(err);
|
||||
assert.strictEqual(res.statusCode, 500);
|
||||
assert(body && body.status && body.status.message);
|
||||
assert.strictEqual(body.status.message, 'Input image exceeds pixel limit');
|
||||
assert.strictEqual(body.status.message, 'Image dimensions are too big');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user