Fix npm test

pull/4997/head
Oliver Günther 8 years ago
parent 216bb4a54b
commit c204359811
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 4
      frontend/app/components/api/api-v3/hal-resources/work-package-resource.service.test.ts
  2. 5
      frontend/app/components/api/api-v3/hal-resources/work-package-resource.service.ts

@ -144,7 +144,9 @@ describe('WorkPackageResource service', () => {
const expectCacheUpdate = () => {
it('should update the work package cache', () => {
expect(updateWorkPackageStub.calledWith(workPackage)).to.be.true;
result.then(() => {
expect(updateWorkPackageStub.calledWith(workPackage)).to.be.true;
});
});
};

@ -475,9 +475,12 @@ export class WorkPackageResource extends HalResource {
resources[name] = linked ? linked.$update() : $q.reject();
});
return $q.all(resources).then(() => {
const promise = $q.all(resources)
promise.then(() => {
wpCacheService.updateWorkPackage(this);
});
return promise;
}
/**

Loading…
Cancel
Save