SEARCH-538

- Included two new tests
This commit is contained in:
Keerthi Niranjan 2018-01-02 10:12:14 +05:30
parent 988439b780
commit 4322615e6b

View File

@ -124,6 +124,26 @@ describe('Tests for Search Utils', function() {
done();
})
});
it('should create user if not exist', function (done) {
SearchUtilsAPI.getSearchUserConfig(2234567891011).catch(function (err) {
expect(err).toEqual(null);
done();
})
});
it('should create file on update', function (done) {
fs.unlinkSync(searchConfig.FOLDERS_CONSTANTS.USER_CONFIG_FILE);
let data = {
rotationId: 0,
version: 2,
language: 'en'
};
SearchUtilsAPI.updateUserConfig(2234567891011, data).catch(function (err) {
expect(err).toEqual(null);
done();
})
});
});
});