deps: bookshelf@lodash-upgrade-fix

no issue
- temporarily upgrades bookshelf to latest master commit
- fixes lodash version incompatibility
This commit is contained in:
Austin Burdine 2016-06-27 08:22:30 -06:00
parent d5e1d122ac
commit acc08b9702
2 changed files with 24 additions and 18 deletions

View File

@ -1014,10 +1014,6 @@ describe('Fixtures', function () {
sandbox.stub(Date.prototype, 'getTimezoneOffset', function () {
return serverTimezoneOffset;
});
sandbox.stub(models.Settings, 'findOne', function () {
return Promise.resolve({attributes: {value: migrationsSettingsValue}});
});
});
describe('error cases', function () {
@ -1025,6 +1021,12 @@ describe('Fixtures', function () {
serverTimezoneOffset = 0;
});
beforeEach(function () {
sandbox.stub(models.Settings, 'findOne', function () {
return Promise.resolve({attributes: {value: migrationsSettingsValue}});
});
});
it('server offset is 0', function (done) {
migrationsSettingsValue = '{}';
@ -1080,21 +1082,25 @@ describe('Fixtures', function () {
return Promise.resolve({});
});
sandbox.stub(models.Base.Model, 'findAll', function () {
var model = models.Base.Model.forge();
model.set('id', Date.now());
model.set('created_at', createdAt);
model.set('key', model.id.toString());
_.each(['Post', 'User', 'Subscriber', 'Settings', 'Role', 'Permission', 'Tag', 'App', 'AppSetting', 'AppField', 'Client'], function (modelType) {
sandbox.stub(models[modelType], 'findAll', function () {
var model = models[modelType].forge();
model.set('id', Date.now());
model.set('created_at', createdAt);
model.set('key', model.id.toString());
newModels[model.id] = model;
return Promise.resolve({models: [model]});
newModels[model.id] = model;
return Promise.resolve({models: [model]});
});
if (modelType !== 'Settings') {
sandbox.stub(models[modelType], 'findOne', function (data) {
return Promise.resolve(newModels[data.id]);
});
}
sandbox.stub(models[modelType], 'edit').returns(Promise.resolve({}));
});
sandbox.stub(models.Base.Model, 'findOne', function (data) {
return Promise.resolve(newModels[data.id]);
});
sandbox.stub(models.Base.Model, 'edit').returns(Promise.resolve({}));
});
it('sqlite: no UTC update, only format', function (done) {

View File

@ -29,7 +29,7 @@
"bcryptjs": "2.3.0",
"bluebird": "3.4.1",
"body-parser": "1.15.1",
"bookshelf": "0.9.5",
"bookshelf": "https://github.com/acburdine/bookshelf#master-built",
"chalk": "1.1.3",
"cheerio": "0.20.0",
"compression": "1.6.2",