Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
This commit is contained in:
commit
f3d2313464
|
@ -45,6 +45,11 @@
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "AgencyMode",
|
"model": "AgencyMode",
|
||||||
"foreignKey": "agencyModeFk"
|
"foreignKey": "agencyModeFk"
|
||||||
|
},
|
||||||
|
"warehouse": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "Warehouse",
|
||||||
|
"foreignKey": "warehouseFk"
|
||||||
},
|
},
|
||||||
"events": {
|
"events": {
|
||||||
"type": "hasMany",
|
"type": "hasMany",
|
||||||
|
|
|
@ -20,10 +20,10 @@ describe('Agency Component vnZoneCard', () => {
|
||||||
describe('getCard()', () => {
|
describe('getCard()', () => {
|
||||||
it(`should make a query and define zone property`, () => {
|
it(`should make a query and define zone property`, () => {
|
||||||
let filter = {
|
let filter = {
|
||||||
include: [
|
include: {
|
||||||
{relation: 'warehouse', fields: ['name']},
|
relation: 'agencyMode',
|
||||||
{relation: 'agencyMode', fields: ['name']}
|
scope: {fields: ['name']}
|
||||||
]
|
}
|
||||||
};
|
};
|
||||||
let json = encodeURIComponent(JSON.stringify(filter));
|
let json = encodeURIComponent(JSON.stringify(filter));
|
||||||
$httpBackend.expectGET(`/agency/api/Zones/1?filter=${json}`).respond({id: 1});
|
$httpBackend.expectGET(`/agency/api/Zones/1?filter=${json}`).respond({id: 1});
|
||||||
|
|
|
@ -22,14 +22,6 @@ describe('Agency Component vnZoneIndex', () => {
|
||||||
expect(result).toEqual({id: 1});
|
expect(result).toEqual({id: 1});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return a formated object with the warehouseFk in case of warehouseFk', () => {
|
|
||||||
let param = 'warehouseFk';
|
|
||||||
let value = 'Silla';
|
|
||||||
let result = controller.exprBuilder(param, value);
|
|
||||||
|
|
||||||
expect(result).toEqual({warehouseFk: 'Silla'});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should return a formated object with the warehouseFk in case of agencyModeFk', () => {
|
it('should return a formated object with the warehouseFk in case of agencyModeFk', () => {
|
||||||
let param = 'agencyModeFk';
|
let param = 'agencyModeFk';
|
||||||
let value = 'My Delivery';
|
let value = 'My Delivery';
|
||||||
|
|
Loading…
Reference in New Issue