0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Updating settings types

- issue #573, issue #632
This commit is contained in:
Hannah Wolfe 2013-09-14 19:04:41 +01:00
parent dea7ac56ac
commit 0b1ffcd1f5
3 changed files with 16 additions and 14 deletions

View file

@ -1,4 +1,9 @@
{ {
"core": {
"currentVersion": {
"default": "000"
}
},
"blog": { "blog": {
"title": { "title": {
"default": "Ghost" "default": "Ghost"
@ -6,6 +11,13 @@
"description": { "description": {
"default": "Just a blogging platform." "default": "Just a blogging platform."
}, },
"email": {
"default": "ghost@example.com",
"validations": {
"notNull": true,
"isEmail": true
}
},
"logo": { "logo": {
"default": "" "default": ""
}, },
@ -33,14 +45,7 @@
} }
} }
}, },
"general": { "theme": {
"email": {
"default": "ghost@example.com",
"validations": {
"notNull": true,
"isEmail": true
}
},
"activePlugins": { "activePlugins": {
"default": "" "default": ""
}, },
@ -48,10 +53,7 @@
"default": "casper" "default": "casper"
} }
}, },
"core": { "plugin": {
"currentVersion": {
"default": "000"
},
"installedPlugins": { "installedPlugins": {
"default": "[]" "default": "[]"
} }

View file

@ -40,7 +40,7 @@ Settings = GhostBookshelf.Model.extend({
defaults: function () { defaults: function () {
return { return {
uuid: uuid.v4(), uuid: uuid.v4(),
type: 'general' type: 'core'
}; };
}, },

View file

@ -154,7 +154,7 @@ describe('Settings Model', function () {
createdSetting.has('uuid').should.equal(true); createdSetting.has('uuid').should.equal(true);
createdSetting.attributes.key.should.equal(newSetting.key, "key is correct"); createdSetting.attributes.key.should.equal(newSetting.key, "key is correct");
createdSetting.attributes.value.should.equal(newSetting.value, "value is correct"); createdSetting.attributes.value.should.equal(newSetting.value, "value is correct");
createdSetting.attributes.type.should.equal("general"); createdSetting.attributes.type.should.equal("core");
done(); done();
}).then(null, done); }).then(null, done);