salix/modules/mdb/back/methods/mdbApp/specs/unlock.spec.js

23 lines
640 B
JavaScript
Raw Permalink Normal View History

2022-11-22 13:43:21 +00:00
const models = require('vn-loopback/server/server').models;
describe('MdbApp unlock()', () => {
it(`should unlock a mdb `, async() => {
const tx = await models.MdbApp.beginTransaction({});
try {
const options = {transaction: tx};
const appName = 'bar';
2022-11-22 13:43:21 +00:00
const developerId = 9;
const ctx = {req: {accessToken: {userId: developerId}}};
const result = await models.MdbApp.unlock(ctx, appName, options);
expect(result.locked).toBeNull();
await tx.rollback();
} catch (e) {
await tx.rollback();
}
});
});