4270-route.create #1023

Merged
joan merged 13 commits from 4270-route.create into dev 2022-08-03 07:09:11 +00:00
1 changed files with 5 additions and 5 deletions
Showing only changes of commit 28deb34047 - Show all commits

View File

@ -4,7 +4,7 @@ describe('route updateWorkCenter()', () => {
const routeId = 1;
it('should set the commission work center if the worker has workCenter', async() => {
const tx = await models.Defaulter.beginTransaction({});
const tx = await models.Route.beginTransaction({});
try {
const developerId = 9;
const ctx = {
@ -26,13 +26,13 @@ describe('route updateWorkCenter()', () => {
}
});
it(`should set the commission work center equals default work center if the worker hasn't workCenter`, async() => {
const tx = await models.Defaulter.beginTransaction({});
it(`shoul set the default commision work center if that worker didn't have one yet`, async() => {
const tx = await models.Route.beginTransaction({});
try {
const noExistentId = 2;
const userWithoutWorkCenter = 2;
const ctx = {
req: {
accessToken: {userId: noExistentId}
accessToken: {userId: userWithoutWorkCenter}
}
};
const options = {transaction: tx};