get user config test updated
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2021-05-25 09:25:22 +02:00
parent 18f22fa350
commit ec86e908e1
1 changed files with 4 additions and 4 deletions

View File

@ -2,9 +2,9 @@ const app = require('vn-loopback/server/server');
describe('userConfig getUserConfig()', () => {
it(`should return the configuration data of a given user`, async() => {
await app.models.UserConfig.getUserConfig({req: {accessToken: {userId: 9}}})
.then(response => {
expect(response.warehouseFk).toEqual(1);
});
const result = await app.models.UserConfig.getUserConfig({req: {accessToken: {userId: 9}}});
expect(result.warehouseFk).toEqual(1);
expect(result.companyFk).toEqual(442);
});
});