Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 5036-regularizar-historicos
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Alexandre Riera 2023-03-08 07:48:11 +01:00
commit 741dd921d2
3 changed files with 7 additions and 4 deletions

View File

@ -11,7 +11,7 @@ module.exports = Self => {
Self.observe('before save', async ctx => {
if (ctx.isNewInstance) return;
await claimIsEditable(ctx);
//await claimIsEditable(ctx);
});
Self.observe('before delete', async ctx => {

View File

@ -89,9 +89,12 @@ describe('claim', () => {
describe('setClaimedQuantity(id, claimedQuantity)', () => {
it('should make a patch and call refresh and showSuccess', () => {
const id = 1;
const claimedQuantity = 1;
jest.spyOn(controller.vnApp, 'showSuccess');
$httpBackend.expectPATCH(`ClaimBeginnings/`).respond({});
controller.setClaimedQuantity(1, 1);
$httpBackend.expectPATCH(`ClaimBeginnings/${id}`).respond({});
controller.setClaimedQuantity(id, claimedQuantity);
$httpBackend.flush();
expect(controller.vnApp.showSuccess).toHaveBeenCalled();

View File

@ -16,7 +16,7 @@ describe('worker filter()', () => {
});
it('should return 2 results filtering by name', async() => {
let result = await app.models.Worker.filter({args: {filter: {}, name: 'agency'}});
let result = await app.models.Worker.filter({args: {filter: {}, firstName: 'agency'}});
expect(result.length).toEqual(2);
expect(result[0].nickname).toEqual('agencyNick');