Compare commits
9 Commits
923296e85e
...
329488d700
Author | SHA1 | Date |
---|---|---|
Robert Ferrús | 329488d700 | |
Sergio De la torre | 7d5928bc3d | |
Pablo Natek | 55daa2d02b | |
Guillermo Bonet | b529ccfe29 | |
Pablo Natek | 86e4e3e981 | |
Sergio De la torre | 07318656b7 | |
Pablo Natek | c4fc51f4b8 | |
Pablo Natek | 50a73c98a2 | |
Pablo Natek | d6349f113c |
|
@ -0,0 +1,7 @@
|
|||
|
||||
|
||||
UPDATE salix.ACL
|
||||
SET principalId = 'deliveryAssistant'
|
||||
WHERE model = 'Ticket'
|
||||
AND property = 'updateAttributes'
|
||||
AND principalId = "delivery";
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE vn.shelvingLog
|
||||
MODIFY COLUMN changedModel enum('Shelving', 'ItemShelving') CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT 'Shelving' NOT NULL;
|
|
@ -1,5 +1,4 @@
|
|||
const models = require('vn-loopback/server/server').models;
|
||||
const LoopBackContext = require('loopback-context');
|
||||
const UserError = require('vn-loopback/util/user-error');
|
||||
|
||||
describe('workerTimeControl login()', () => {
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
const models = require('vn-loopback/server/server').models;
|
||||
|
||||
describe('sendMail', () => {
|
||||
it('should insert in mail', async() => {
|
||||
const tx = await models.Sale.beginTransaction({});
|
||||
const options = {transaction: tx};
|
||||
options.transaction = tx;
|
||||
let mailCountBefore;
|
||||
let mailCountAfter;
|
||||
const ctx = {
|
||||
req: {accessToken: {userId: 50}},
|
||||
args: {workerFk: 1106, year: 2001, week: 1}
|
||||
};
|
||||
|
||||
try {
|
||||
mailCountBefore = await models.Mail.count(options);
|
||||
await models.WorkerTimeControl.sendMail(ctx, options);
|
||||
mailCountAfter = await models.Mail.count(options);
|
||||
} catch (e) {
|
||||
await tx.rollback();
|
||||
throw e;
|
||||
}
|
||||
|
||||
expect(mailCountAfter).toBeGreaterThan(mailCountBefore);
|
||||
await tx.rollback();
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue