Added asset settings + improved tests for routes

This commit is contained in:
Wyatt Johnson
2016-11-29 10:01:52 -07:00
parent 735f2d09ad
commit ac17fc2cc6
13 changed files with 401 additions and 407 deletions
+2
View File
@@ -14,6 +14,7 @@ describe('Setting: model', () => {
expect(settings).to.have.property('moderation').and.to.equal('pre');
});
});
it('should have two infoBox fields defined', () => {
return Setting.getSettings().then(settings => {
expect(settings).to.have.property('infoBoxEnable').and.to.equal(false);
@@ -26,6 +27,7 @@ describe('Setting: model', () => {
it('should update the settings with a passed object', () => {
const mockSettings = {moderation: 'post', infoBoxEnable: true, infoBoxContent: 'yeah'};
return Setting.updateSettings(mockSettings).then(updatedSettings => {
expect(updatedSettings).to.be.an('object');
expect(updatedSettings).to.have.property('moderation').and.to.equal('post');
expect(updatedSettings).to.have.property('infoBoxEnable', true);
expect(updatedSettings).to.have.property('infoBoxContent', 'yeah');