Fix some file fallback retrieval for some langs. Added tests

This commit is contained in:
vjrj 2018-02-26 20:11:41 +01:00
parent 1df41f1e5a
commit 1cf2a6883a
3 changed files with 49 additions and 2 deletions

View file

@ -10,6 +10,7 @@ const setting = {
name: 'site-test',
value: 'Some value',
description: 'Some description',
isPublic: true,
type: 'string'
};
@ -19,6 +20,11 @@ describe('site settings store', () => {
});
it('should insert settings', () => {
// Remove previous test register
const alreadyInserted = SiteSettings.findOne({ name: 'site-test' });
if (alreadyInserted) {
SiteSettings.remove(alreadyInserted._id);
}
const id = SiteSettings.insert(setting);
SiteSettings.getSchema(setting.type).validate(setting);