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
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
commit
741dd921d2
|
@ -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 => {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue