Further grunt & test cleanup

This commit is contained in:
Hannah Wolfe 2013-11-11 21:35:17 +00:00
parent b2b273a63a
commit cd12210b0b
3 changed files with 19 additions and 4 deletions

View File

@ -21,6 +21,7 @@ var path = require('path'),
'!node_modules/**',
'!core/test/**',
'!core/client/assets/sass/**',
'!core/server/data/export/exported*',
'!**/*.db*',
'!*.db*',
'!.sass*',
@ -32,7 +33,8 @@ var path = require('path'),
'!CONTRIBUTING.md',
'!SECURITY.md',
'!.travis.yml',
'!Gemfile*'
'!Gemfile*',
'!*.html'
],
configureGrunt = function (grunt) {
@ -878,7 +880,7 @@ var path = require('path'),
grunt.registerTask('test-integration', 'Run integration tests', ['clean:test', 'setTestEnv', 'loadConfig', 'express:test', 'mochacli:integration', 'express:test:stop']);
grunt.registerTask('test-functional', 'Run casperjs tests only', ['clean:test', 'setTestEnv', 'express:test', 'spawn-casperjs', 'express:test:stop']);
grunt.registerTask('test-functional', 'Run casperjs tests only', ['clean:test', 'setTestEnv', 'loadConfig', 'express:test', 'spawn-casperjs', 'express:test:stop']);
grunt.registerTask('validate', 'Run tests and lint code', ['jslint', 'test-unit', 'test-integration', 'test-functional']);

View File

@ -1,4 +1,4 @@
/*globals describe, beforeEach, it*/
/*globals describe, beforeEach, afterEach, it*/
var fs = require('fs-extra'),
should = require('should'),
sinon = require('sinon'),
@ -54,7 +54,7 @@ describe('Admin Controller', function () {
it('should return 415 for invalid file type', function () {
res.send = sinon.stub();
req.files.uploadimage.name = 'INVALID.jpg';
req.files.uploadimage.type = 'application/octet-stream'
req.files.uploadimage.type = 'application/octet-stream';
admin.uploader(req, res);
res.send.calledOnce.should.be.true;
res.send.args[0][0].should.equal(415);

View File

@ -0,0 +1,13 @@
/*globals describe, beforeEach, afterEach, it*/
var should = require('should'),
sinon = require('sinon'),
when = require('when'),
// Stuff we are testing
frontend = require('../../server/controllers/frontend');
describe('Frontend Controller', function () {
describe('homepage', function () {
// No tests yet, shows up in coverage report
});
});