2019-01-24 08:08:28 +00:00
|
|
|
const app = require('vn-loopback/server/server');
|
2018-10-08 09:03:28 +00:00
|
|
|
|
|
|
|
describe('userConfig getUserConfig()', () => {
|
|
|
|
it(`should return the configuration data of a given user`, async() => {
|
2021-05-25 07:25:22 +00:00
|
|
|
const result = await app.models.UserConfig.getUserConfig({req: {accessToken: {userId: 9}}});
|
|
|
|
|
|
|
|
expect(result.warehouseFk).toEqual(1);
|
|
|
|
expect(result.companyFk).toEqual(442);
|
2018-10-08 09:03:28 +00:00
|
|
|
});
|
|
|
|
});
|