mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-08 02:52:39 -05:00
Merge pull request #6507 from cameronviner/6505
Clean up the after the shouldjs upgrade tests closes #6505
This commit is contained in:
commit
d1b56c23fe
107 changed files with 20 additions and 155 deletions
|
@ -1,5 +1,4 @@
|
|||
/*global describe, it */
|
||||
/*jshint expr:true*/
|
||||
// # Module tests
|
||||
// This tests using Ghost as an npm module
|
||||
var should = require('should'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*global describe, it, before, after */
|
||||
/*jshint expr:true*/
|
||||
var supertest = require('supertest'),
|
||||
should = require('should'),
|
||||
testUtils = require('../../../utils'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*global describe, it, before, after */
|
||||
/*jshint expr:true*/
|
||||
var supertest = require('supertest'),
|
||||
should = require('should'),
|
||||
testUtils = require('../../../utils'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*global describe, it, before, after */
|
||||
/*jshint expr:true*/
|
||||
// # Api Route tests
|
||||
// As it stands, these tests depend on the database, and as such are integration tests.
|
||||
// Mocking out the models to not touch the DB would turn these into unit tests, and should probably be done in future,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*global describe, it, before, after */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../../utils'),
|
||||
supertest = require('supertest'),
|
||||
should = require('should'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*global describe, it, before, after */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../../utils'),
|
||||
should = require('should'),
|
||||
supertest = require('supertest'),
|
||||
|
@ -192,7 +191,7 @@ describe('Post API', function () {
|
|||
_.isBoolean(jsonResponse.posts[0].featured).should.eql(true);
|
||||
_.isBoolean(jsonResponse.posts[0].page).should.eql(true);
|
||||
jsonResponse.posts[0].author.should.be.a.Number();
|
||||
testUtils.API.isISO8601(jsonResponse.posts[0].created_at).should.be.true;
|
||||
testUtils.API.isISO8601(jsonResponse.posts[0].created_at).should.be.true();
|
||||
jsonResponse.posts[0].created_by.should.be.a.Number();
|
||||
// Tags aren't included by default
|
||||
should.not.exist(jsonResponse.posts[0].tags);
|
||||
|
@ -815,7 +814,7 @@ describe('Post API', function () {
|
|||
|
||||
var jsonResponse = res.body,
|
||||
changedValue = 'My new Title';
|
||||
jsonResponse.posts[0].title.exist;
|
||||
should.exist(jsonResponse.posts[0].title);
|
||||
jsonResponse.posts[0].testvalue = changedValue;
|
||||
jsonResponse.posts[0].id = 99;
|
||||
request.put(testUtils.API.getApiQuery('posts/99/'))
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*global describe, it, before, after */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../../utils'),
|
||||
should = require('should'),
|
||||
supertest = require('supertest'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*global describe, it, before, after */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../../utils'),
|
||||
should = require('should'),
|
||||
supertest = require('supertest'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*global describe, it, before, after */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../../utils'),
|
||||
should = require('should'),
|
||||
supertest = require('supertest'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*global describe, it, before, after */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../../utils'),
|
||||
should = require('should'),
|
||||
supertest = require('supertest'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*global describe, it, before, after */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../../utils'),
|
||||
should = require('should'),
|
||||
supertest = require('supertest'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, after, it */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
_ = require('lodash'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, afterEach, it */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
_ = require('lodash'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
config = require('../../../server/config'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
_ = require('lodash'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
_ = require('lodash'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
_ = require('lodash'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
_ = require('lodash'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
Promise = require('bluebird'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
/*jshint expr:true*/
|
||||
var _ = require('lodash'),
|
||||
testUtils = require('../../utils'),
|
||||
rewire = require('rewire'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var fs = require('fs-extra'),
|
||||
should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
|
@ -10,9 +9,6 @@ var fs = require('fs-extra'),
|
|||
UploadAPI = require('../../../server/api/upload'),
|
||||
store;
|
||||
|
||||
// To stop jshint complaining
|
||||
should.equal(true, true);
|
||||
|
||||
describe('Upload API', function () {
|
||||
// Doesn't test the DB
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../utils/index'),
|
||||
should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, after, it */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../utils/index'),
|
||||
should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../utils'),
|
||||
should = require('should'),
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
sequence = require('../../../server/utils/sequence'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, it, before, beforeEach, afterEach */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
sequence = require('../../../server/utils/sequence'),
|
||||
|
@ -786,7 +785,7 @@ describe('Post Model', function () {
|
|||
// Should not have a conflicted slug from the first
|
||||
updatedSecondPost.get('slug').should.not.equal(firstPost.slug);
|
||||
|
||||
eventSpy.calledThrice.should.be.true;
|
||||
eventSpy.calledThrice.should.be.true();
|
||||
eventSpy.thirdCall.calledWith('post.edited').should.be.true();
|
||||
|
||||
return PostModel.findOne({
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, it, before, beforeEach, afterEach */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
Promise = require('bluebird'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, after, it*/
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../utils'),
|
||||
should = require('should'),
|
||||
rewire = require('rewire'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, it, afterEach */
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
_ = require('lodash'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
Promise = require('bluebird'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var path = require('path'),
|
||||
EventEmitter = require('events').EventEmitter,
|
||||
should = require('should'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, it, before, beforeEach, afterEach */
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
Promise = require('bluebird'),
|
||||
|
@ -16,8 +15,6 @@ var should = require('should'),
|
|||
// storing current environment
|
||||
currentEnv = process.env.NODE_ENV;
|
||||
i18n.init();
|
||||
// To stop jshint complaining
|
||||
should.equal(true, true);
|
||||
|
||||
describe('Config', function () {
|
||||
afterEach(function () {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
errors = require('../../../../server/errors'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
Promise = require('bluebird'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var moment = require('moment'),
|
||||
should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
|
@ -14,9 +13,6 @@ var moment = require('moment'),
|
|||
configUtils = require('../../../utils/configUtils'),
|
||||
sandbox = sinon.sandbox.create();
|
||||
|
||||
// To stop jshint complaining
|
||||
should.equal(true, true);
|
||||
|
||||
describe('Frontend Controller', function () {
|
||||
var adminEditPagePath = '/ghost/editor/';
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, it, afterEach, beforeEach*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
rewire = require('rewire'),
|
||||
|
||||
|
@ -8,9 +7,6 @@ var should = require('should'),
|
|||
|
||||
configUtils = require('../../../utils/configUtils');
|
||||
|
||||
// To stop jshint complaining
|
||||
should.equal(true, true);
|
||||
|
||||
describe('templates', function () {
|
||||
afterEach(function () {
|
||||
configUtils.restore();
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, after, before, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
Promise = require('bluebird'),
|
||||
sinon = require('sinon'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
Promise = require('bluebird'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* globals describe, beforeEach, afterEach, it */
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
ghostUrl = require('../../shared/ghost-url'),
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
Promise = require('bluebird'),
|
||||
|
@ -22,9 +21,6 @@ var should = require('should'),
|
|||
configUtils = require('../utils/configUtils'),
|
||||
sandbox = sinon.sandbox.create();
|
||||
|
||||
// To stop jshint complaining
|
||||
should.equal(true, true);
|
||||
|
||||
describe('Importer', function () {
|
||||
afterEach(function () {
|
||||
sandbox.restore();
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, afterEach, beforeEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
Promise = require('bluebird'),
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
Promise = require('bluebird'),
|
||||
|
@ -29,9 +28,6 @@ var should = require('should'),
|
|||
expires: Date.now() - globalUtils.ONE_DAY_MS
|
||||
};
|
||||
|
||||
// To stop jshint complaining
|
||||
should.equal(true, true);
|
||||
|
||||
describe('Auth Strategies', function () {
|
||||
var next;
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, it, beforeEach, afterEach */
|
||||
/*jshint expr:true*/
|
||||
var sinon = require('sinon'),
|
||||
should = require('should'),
|
||||
passport = require('passport'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
middleware = require('../../../server/middleware').middleware;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, it, beforeEach, afterEach */
|
||||
/*jshint expr:true*/
|
||||
var sinon = require('sinon'),
|
||||
should = require('should'),
|
||||
configUtils = require('../../utils/configUtils'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
decideIsAdmin = require('../../../server/middleware/decide-is-admin');
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var sinon = require('sinon'),
|
||||
should = require('should'),
|
||||
Promise = require('bluebird'),
|
||||
|
@ -7,9 +6,6 @@ var sinon = require('sinon'),
|
|||
oAuth = require('../../../server/middleware/oauth'),
|
||||
Models = require('../../../server/models');
|
||||
|
||||
// To stop jshint complaining
|
||||
should.equal(true, true);
|
||||
|
||||
describe('OAuth', function () {
|
||||
var next, req, res, sandbox;
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var crypto = require('crypto'),
|
||||
should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
|
@ -35,7 +34,8 @@ describe('Private Blogging', function () {
|
|||
var req, res, next;
|
||||
|
||||
beforeEach(function () {
|
||||
req = {}, res = {};
|
||||
req = {};
|
||||
res = {};
|
||||
apiSettingsStub = sandbox.stub(api.settings, 'read');
|
||||
next = sinon.spy();
|
||||
});
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, it, beforeEach, afterEach */
|
||||
/*jshint expr:true*/
|
||||
var sinon = require('sinon'),
|
||||
should = require('should'),
|
||||
Promise = require('bluebird'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, it, beforeEach, afterEach */
|
||||
/*jshint expr:true*/
|
||||
var fs = require('fs'),
|
||||
sinon = require('sinon'),
|
||||
serveSharedFile = require('../../../server/middleware/serve-shared-file'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
middleware = require('../../../server/middleware').middleware;
|
||||
|
@ -92,7 +91,7 @@ describe('Middleware: spamPrevention', function () {
|
|||
|
||||
middleware.spamPrevention.signin(req, null, spyNext);
|
||||
should(error).equal(undefined);
|
||||
spyNext.should.be.calledOnce;
|
||||
spyNext.should.be.called();
|
||||
|
||||
process.hrtime.restore();
|
||||
done();
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
/*globals describe, it, beforeEach */
|
||||
/*jshint expr:true*/
|
||||
var sinon = require('sinon'),
|
||||
should = require('should'),
|
||||
|
||||
express = require('express'),
|
||||
staticTheme = require('../../../server/middleware/static-theme');
|
||||
|
||||
should.equal(true, true);
|
||||
|
||||
describe('staticTheme', function () {
|
||||
var next;
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, it, beforeEach, afterEach */
|
||||
/*jshint expr:true*/
|
||||
var sinon = require('sinon'),
|
||||
should = require('should'),
|
||||
express = require('express'),
|
||||
|
@ -15,8 +14,6 @@ var sinon = require('sinon'),
|
|||
configUtils = require('../../utils/configUtils'),
|
||||
sandbox = sinon.sandbox.create();
|
||||
|
||||
should.equal(true, true);
|
||||
|
||||
describe('Theme Handler', function () {
|
||||
var req, res, next, blogApp;
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var sinon = require('sinon'),
|
||||
should = require('should'),
|
||||
uncapitalise = require('../../../server/middleware/uncapitalise');
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
_ = require('lodash'),
|
||||
crypto = require('crypto'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, it, beforeEach, afterEach */
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, it, before, beforeEach, afterEach */
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
rewire = require('rewire'),
|
||||
|
@ -11,9 +10,6 @@ var should = require('should'),
|
|||
|
||||
sandbox = sinon.sandbox.create();
|
||||
|
||||
// To stop jshint complaining
|
||||
should.equal(true, true);
|
||||
|
||||
describe('Filter', function () {
|
||||
before(function () {
|
||||
return models.init().then(function () {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, it, before, beforeEach, afterEach */
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
Promise = require('bluebird'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var testUtils = require('../utils'),
|
||||
should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
rewire = require('rewire'),
|
||||
|
@ -15,9 +14,6 @@ var should = require('should'),
|
|||
|
||||
configUtils = require('../utils/configUtils');
|
||||
|
||||
// To stop jshint complaining
|
||||
should.equal(true, true);
|
||||
|
||||
// Helper function to prevent unit tests
|
||||
// from failing via timeout when they
|
||||
// should just immediately fail
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, after, it */
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
hbs = require('express-hbs'),
|
||||
utils = require('./utils'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
hbs = require('express-hbs'),
|
||||
utils = require('./utils'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, after, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
hbs = require('express-hbs'),
|
||||
utils = require('./utils'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
hbs = require('express-hbs'),
|
||||
utils = require('./utils'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
hbs = require('express-hbs'),
|
||||
utils = require('./utils'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
hbs = require('express-hbs'),
|
||||
utils = require('./utils'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
hbs = require('express-hbs'),
|
||||
utils = require('./utils'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
_ = require('lodash'),
|
||||
|
@ -62,7 +61,7 @@ describe('{{#foreach}} helper', function () {
|
|||
|
||||
_.each(context, function (value, index) {
|
||||
options.fn.getCall(index).args[0].should.eql(value);
|
||||
should(options.fn.getCall(index).args[1].data).be.undefined;
|
||||
should(options.fn.getCall(index).args[1].data).be.undefined();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -155,7 +154,7 @@ describe('{{#foreach}} helper', function () {
|
|||
|
||||
_.each(_.keys(context), function (value, index) {
|
||||
options.fn.getCall(index).args[0].should.eql(context[value]);
|
||||
should(options.fn.getCall(index).args[1].data).not.be.undefined;
|
||||
should(options.fn.getCall(index).args[1].data).not.be.undefined();
|
||||
|
||||
// Expected properties
|
||||
resultData[index].data.should.containEql(expected[index]);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
hbs = require('express-hbs'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
Promise = require('bluebird'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, afterEach, beforeEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
_ = require('lodash'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
hbs = require('express-hbs'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, afterEach, after, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
hbs = require('express-hbs'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
hbs = require('express-hbs'),
|
||||
utils = require('./utils'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
hbs = require('express-hbs'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, after, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
hbs = require('express-hbs'),
|
||||
utils = require('./utils'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, after, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
hbs = require('express-hbs'),
|
||||
utils = require('./utils'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
hbs = require('express-hbs'),
|
||||
utils = require('./utils'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
Promise = require('bluebird'),
|
||||
|
@ -48,10 +47,10 @@ describe('{{next_post}} helper', function () {
|
|||
slug: 'current',
|
||||
created_at: new Date(0),
|
||||
url: '/current/'}, optionsData).then(function () {
|
||||
fn.calledOnce.should.be.true;
|
||||
inverse.calledOnce.should.be.false;
|
||||
fn.calledOnce.should.be.true();
|
||||
inverse.calledOnce.should.be.false();
|
||||
|
||||
readPostStub.calledOnce.should.be.true;
|
||||
readPostStub.calledOnce.should.be.true();
|
||||
readPostStub.firstCall.args[0].include.should.eql('next,next.author,next.tags');
|
||||
done();
|
||||
}).catch(function (err) {
|
||||
|
@ -82,8 +81,8 @@ describe('{{next_post}} helper', function () {
|
|||
slug: 'current',
|
||||
created_at: new Date(0),
|
||||
url: '/current/'}, optionsData).then(function () {
|
||||
fn.called.should.be.false;
|
||||
inverse.called.should.be.true;
|
||||
fn.called.should.be.false();
|
||||
inverse.called.should.be.true();
|
||||
done();
|
||||
}).catch(function (err) {
|
||||
done(err);
|
||||
|
@ -107,9 +106,9 @@ describe('{{next_post}} helper', function () {
|
|||
optionsData = {name: 'next_post', fn: fn, inverse: inverse};
|
||||
|
||||
helpers.prev_post.call({}, optionsData).then(function () {
|
||||
fn.called.should.be.false;
|
||||
inverse.called.should.be.true;
|
||||
readPostStub.called.should.be.false;
|
||||
fn.called.should.be.false();
|
||||
inverse.called.should.be.true();
|
||||
readPostStub.called.should.be.false();
|
||||
done();
|
||||
}).catch(function (err) {
|
||||
done(err);
|
||||
|
@ -142,8 +141,8 @@ describe('{{next_post}} helper', function () {
|
|||
created_at: new Date(0),
|
||||
url: '/current/'}, optionsData)
|
||||
.then(function () {
|
||||
fn.called.should.be.true;
|
||||
inverse.called.should.be.false;
|
||||
fn.called.should.be.true();
|
||||
inverse.called.should.be.false();
|
||||
done();
|
||||
}).catch(function (err) {
|
||||
done(err);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, after, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
hbs = require('express-hbs'),
|
||||
utils = require('./utils'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
hbs = require('express-hbs'),
|
||||
utils = require('./utils'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
hbs = require('express-hbs'),
|
||||
utils = require('./utils'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
hbs = require('express-hbs'),
|
||||
utils = require('./utils'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, beforeEach, afterEach, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
Promise = require('bluebird'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
hbs = require('express-hbs'),
|
||||
utils = require('./utils'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
hbs = require('express-hbs'),
|
||||
utils = require('./utils'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, before, beforeEach, afterEach, after, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
Promise = require('bluebird'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, beforeEach, it*/
|
||||
/*jshint expr:true*/
|
||||
// jscs:disable requireCamelCaseOrUpperCaseIdentifiers
|
||||
var should = require('should'),
|
||||
rewire = require('rewire'),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
hbs = require('express-hbs'),
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*globals describe, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
http = require('http'),
|
||||
config = require('../../../config');
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue