mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
jslint
This commit is contained in:
parent
1af28bc2ac
commit
76891afd08
2 changed files with 28 additions and 30 deletions
|
@ -15,17 +15,17 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
defaultSettings = {
|
defaultSettings = {
|
||||||
title: 'My Blog',
|
title: 'My Blog',
|
||||||
description: ''
|
description: ''
|
||||||
},
|
},
|
||||||
|
|
||||||
getSettings = function () {
|
getSettings = function () {
|
||||||
return $.extend(defaultSettings, {
|
return $.extend(defaultSettings, {
|
||||||
title : $('#blog-title').val(),
|
title : $('#blog-title').val(),
|
||||||
description : $('#blog-description').val()
|
description : $('#blog-description').val()
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
if (location.hash) {
|
if (location.hash) {
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
fixtures = require('../../shared/data/fixtures/001'),
|
fixtures = require('../../shared/data/fixtures/001'),
|
||||||
api;
|
api;
|
||||||
|
|
||||||
function fail (err) {
|
function fail(err) {
|
||||||
process.nextTick(function(){
|
process.nextTick(function () {
|
||||||
assert.ifError(err);
|
assert.ifError(err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
setUp: function (done) {
|
setUp: function (done) {
|
||||||
// Clear database
|
// Clear database
|
||||||
var dbpath = path.resolve(__dirname, '../../../', config.database.testing.connection.filename);
|
var dbpath = path.resolve(__dirname, '../../../', config.database.testing.connection.filename);
|
||||||
fs.unlink(dbpath, function(){
|
fs.unlink(dbpath, function () {
|
||||||
// There is currently no way to tell when Ghost is loaded. api instantiates it's own `Ghost`
|
// There is currently no way to tell when Ghost is loaded. api instantiates it's own `Ghost`
|
||||||
// which will run migrations without making the promise externally accessible
|
// which will run migrations without making the promise externally accessible
|
||||||
api = require('../../shared/api');
|
api = require('../../shared/api');
|
||||||
|
@ -37,30 +37,28 @@
|
||||||
test.expect(1);
|
test.expect(1);
|
||||||
api.settings.browse().then(function (settings) {
|
api.settings.browse().then(function (settings) {
|
||||||
settings = _.map(settings.toJSON(), function (item) {
|
settings = _.map(settings.toJSON(), function (item) {
|
||||||
return _.omit(item, 'id', 'updated_at', 'created_at')
|
return _.omit(item, 'id', 'updated_at', 'created_at');
|
||||||
});
|
});
|
||||||
test.deepEqual(settings, fixtures.settings);
|
test.deepEqual(settings, fixtures.settings);
|
||||||
test.done();
|
test.done();
|
||||||
}).then(null, fail);
|
}).then(null, fail);
|
||||||
},
|
},
|
||||||
|
|
||||||
// 'settings:read': function (test) {
|
'settings:read': function (test) {
|
||||||
// api.settings.read('title', function (setting) {
|
api.settings.read('title', function (setting) {
|
||||||
// console.log(setting);
|
test.done();
|
||||||
// test.done();
|
}).then(null, fail);
|
||||||
// }).then(null, fail);
|
},
|
||||||
// },
|
|
||||||
|
|
||||||
// 'settings:edit': function (test) {
|
'settings:edit': function (test) {
|
||||||
// test.expect(2);
|
test.expect(2);
|
||||||
// api.settings.edit('title', "Jenna O'Neil").then(function (title) {
|
api.settings.edit('title', "Jenna O'Neil").then(function (title) {
|
||||||
// title = title.toJSON();
|
title = title.toJSON();
|
||||||
// console.log('got title')
|
test.equal(title.key, 'title');
|
||||||
// test.equal(title.key, 'title');
|
test.equal(title.value, "Jenna O'Neil");
|
||||||
// test.equal(title.value, "Jenna O'Neil");
|
test.done();
|
||||||
// test.done();
|
}).then(null, fail);
|
||||||
// }).then(null, fail);
|
}
|
||||||
// }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}());
|
}());
|
Loading…
Reference in a new issue