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",
|
||||
"model": "AgencyMode",
|
||||
"foreignKey": "agencyModeFk"
|
||||
},
|
||||
"warehouse": {
|
||||
"type": "belongsTo",
|
||||
"model": "Warehouse",
|
||||
"foreignKey": "warehouseFk"
|
||||
},
|
||||
"events": {
|
||||
"type": "hasMany",
|
||||
|
|
|
@ -20,10 +20,10 @@ describe('Agency Component vnZoneCard', () => {
|
|||
describe('getCard()', () => {
|
||||
it(`should make a query and define zone property`, () => {
|
||||
let filter = {
|
||||
include: [
|
||||
{relation: 'warehouse', fields: ['name']},
|
||||
{relation: 'agencyMode', fields: ['name']}
|
||||
]
|
||||
include: {
|
||||
relation: 'agencyMode',
|
||||
scope: {fields: ['name']}
|
||||
}
|
||||
};
|
||||
let json = encodeURIComponent(JSON.stringify(filter));
|
||||
$httpBackend.expectGET(`/agency/api/Zones/1?filter=${json}`).respond({id: 1});
|
||||
|
|
|
@ -22,14 +22,6 @@ describe('Agency Component vnZoneIndex', () => {
|
|||
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', () => {
|
||||
let param = 'agencyModeFk';
|
||||
let value = 'My Delivery';
|
||||
|
|
Loading…
Reference in New Issue