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:
Peter Jaszkowiak
2021-09-27 11:22:12 -06:00
committed by GitHub
parent ac1b9692f2
commit ff84d6c52f
4 changed files with 27 additions and 21 deletions

View File

@@ -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();
});
});