fix: #6184 Requested changes
This commit is contained in:
parent
1e56e741e2
commit
d39d54a514
|
@ -6,6 +6,7 @@ describe('route downloadCmrsZip()', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create a zip file with the given cmr ids', async() => {
|
it('should create a zip file with the given cmr ids', async() => {
|
||||||
|
const tx = await models.Route.beginTransaction({});
|
||||||
const ctx = {
|
const ctx = {
|
||||||
req: {
|
req: {
|
||||||
getLocale: () => {
|
getLocale: () => {
|
||||||
|
@ -15,8 +16,14 @@ describe('route downloadCmrsZip()', () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let cmrs = '1,2';
|
let cmrs = '1,2';
|
||||||
let result = await models.Route.downloadCmrsZip(ctx, cmrs);
|
try {
|
||||||
|
await models.Route.downloadCmrsZip(ctx, cmrs);
|
||||||
|
await tx.rollback();
|
||||||
|
} catch (e) {
|
||||||
|
error = e;
|
||||||
|
await tx.rollback();
|
||||||
|
}
|
||||||
|
|
||||||
expect(result.length).toBeGreaterThanOrEqual(1);
|
expect(error).toBeDefined();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const models = require('vn-loopback/server/server').models;
|
const models = require('vn-loopback/server/server').models;
|
||||||
|
|
||||||
describe('Ticket saveCmr()', () => {
|
describe('ticket saveCmr()', () => {
|
||||||
let ctx = {req: {
|
let ctx = {req: {
|
||||||
accessToken: {userId: 9}
|
accessToken: {userId: 9}
|
||||||
}};
|
}};
|
||||||
|
|
Loading…
Reference in New Issue