test(supplier_summary): test for sageWithholdingFk to isFarmer
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
e9f77bb9b4
commit
83a28bc0ee
|
@ -25,7 +25,19 @@ describe('Supplier', () => {
|
|||
controller.getSummary();
|
||||
$httpBackend.flush();
|
||||
|
||||
expect(controller.summary).toEqual({id: 1});
|
||||
expect(controller.summary).toEqual({id: 1, isFarmer: false});
|
||||
});
|
||||
|
||||
it('should get if supplier is farmer by sageWithholdingFk', () => {
|
||||
controller.supplier = {id: 2};
|
||||
|
||||
const query = `Suppliers/${controller.supplier.id}/getSummary`;
|
||||
|
||||
$httpBackend.expectGET(query).respond({id: 2, sageWithholdingFk: 2});
|
||||
controller.getSummary();
|
||||
$httpBackend.flush();
|
||||
|
||||
expect(controller.summary).toEqual({id: 2, isFarmer: true, sageWithholdingFk: 2});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue