mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 10:35:55 +01:00
feat: deprecate file.isFileTypeAllowed
use image.isFileTypeAllowed, this function was always meant for images
This commit is contained in:
@@ -163,6 +163,13 @@ describe('Upload Controllers', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('should fail if file is not an image', function (done) {
|
||||
image.isFileTypeAllowed(path.join(__dirname, '../test/files/notanimage.png'), function (err) {
|
||||
assert.equal(err.message, 'Input file contains unsupported image format');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should fail if file is not an image', function (done) {
|
||||
image.size(path.join(__dirname, '../test/files/notanimage.png'), function (err) {
|
||||
assert.equal(err.message, 'Input file contains unsupported image format');
|
||||
|
||||
Reference in New Issue
Block a user