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

View File

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

View File

@ -154,7 +154,7 @@ describe('Settings Model', function () {
createdSetting.has('uuid').should.equal(true);
createdSetting.attributes.key.should.equal(newSetting.key, "key 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();
}).then(null, done);