Updated front unit test
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
bb691ccf1d
commit
c93d3f8846
|
@ -89,9 +89,12 @@ describe('claim', () => {
|
||||||
|
|
||||||
describe('setClaimedQuantity(id, claimedQuantity)', () => {
|
describe('setClaimedQuantity(id, claimedQuantity)', () => {
|
||||||
it('should make a patch and call refresh and showSuccess', () => {
|
it('should make a patch and call refresh and showSuccess', () => {
|
||||||
|
const id = 1;
|
||||||
|
const claimedQuantity = 1;
|
||||||
|
|
||||||
jest.spyOn(controller.vnApp, 'showSuccess');
|
jest.spyOn(controller.vnApp, 'showSuccess');
|
||||||
$httpBackend.expectPATCH(`ClaimBeginnings/`).respond({});
|
$httpBackend.expectPATCH(`ClaimBeginnings/${id}`).respond({});
|
||||||
controller.setClaimedQuantity(1, 1);
|
controller.setClaimedQuantity(id, claimedQuantity);
|
||||||
$httpBackend.flush();
|
$httpBackend.flush();
|
||||||
|
|
||||||
expect(controller.vnApp.showSuccess).toHaveBeenCalled();
|
expect(controller.vnApp.showSuccess).toHaveBeenCalled();
|
||||||
|
|
Loading…
Reference in New Issue