mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-03 16:38:22 +03:00
deps: bookshelf@lodash-upgrade-fix
no issue - temporarily upgrades bookshelf to latest master commit - fixes lodash version incompatibility
This commit is contained in:
parent
d5e1d122ac
commit
acc08b9702
@ -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) {
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user