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+XcO}AGPLnvm=J9YkSs-;jD?LVN1G`>c>aYR
z?gd~G?b2m=bC7(Tvb1_
z#vPvaD2KuZbk$iRS&lXt3lpJ@0pg`-)zRsd~Qqi(!EXHwe977XwC}Y1<9#s
z&dMghw`VL>P{Tm!gdaBMi|d!4mtmSbsbgi
zKn3-sZz#ouifmAF
zu<0ywC~UyOSt41EHW>>Op^X9JrD)^92*W|G&6}1TopsK=zq {
});
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();
});
});