Node.js based forum software built for the modern web
test fix
barisusaklida7bc5bb7abc
diff --git a/src/groups/cover.js b/src/groups/cover.jsindex a7d7550fa0..99386879c1 100644--- a/src/groups/cover.js+++ b/src/groups/cover.js@@ -2,6 +2,7 @@var async = require('async');var fs = require('fs');+var path = require('path');var Jimp = require('jimp');var mime = require('mime');var winston = require('winston');@@ -37,8 +38,9 @@ module.exports = function (Groups) {},function (_tempPath, next) {tempPath = _tempPath;+uploadsController.uploadGroupCover(uid, {- name: 'groupCover',+ name: 'groupCover' + path.extname(tempPath),path: tempPath,type: type,}, next);@@ -52,7 +54,7 @@ module.exports = function (Groups) {},function (next) {uploadsController.uploadGroupCover(uid, {- name: 'groupCoverThumb',+ name: 'groupCoverThumb' + path.extname(tempPath),path: tempPath,type: type,}, next);diff --git a/test/uploads.js b/test/uploads.jsindex 0daf0407b9..a4fe95c5df 100644--- a/test/uploads.js+++ b/test/uploads.js@@ -104,7 +104,10 @@ describe('Upload Controllers', function () {it('should upload a file to a post', function (done) {meta.config.allowFileUploads = 1;+ var oldValue = meta.config.allowedFileExtensions;+ meta.config.allowedFileExtensions = 'png,jpg,bmp,html';helpers.uploadFile(nconf.get('url') + '/api/post/upload', path.join(__dirname, '../test/files/503.html'), { cid: cid }, jar, csrf_token, function (err, res, body) {+ meta.config.allowedFileExtensions = oldValue;assert.ifError(err);assert.equal(res.statusCode, 200);assert(Array.isArray(body));