From 89b3d2c40e6b4b61bd2f4e519736b5ef0e92ab57 Mon Sep 17 00:00:00 2001 From: Art Lowel Date: Tue, 4 Feb 2020 15:59:30 +0100 Subject: [PATCH] fix findByHref test --- src/app/core/data/resource-policy.service.spec.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/core/data/resource-policy.service.spec.ts b/src/app/core/data/resource-policy.service.spec.ts index 56918fd941..971d62b2dd 100644 --- a/src/app/core/data/resource-policy.service.spec.ts +++ b/src/app/core/data/resource-policy.service.spec.ts @@ -53,15 +53,17 @@ describe('ResourcePolicyService', () => { notificationsService, http, comparator - ) + ); + + spyOn((service as any).dataService, 'findByHref').and.callThrough(); }); describe('findByHref', () => { - it('should configure the proper GetRequest', () => { + it('should proxy the call to dataservice.findByHref', () => { scheduler.schedule(() => service.findByHref(requestURL)); scheduler.flush(); - expect(requestService.configure).toHaveBeenCalledWith(new GetRequest(requestUUID, requestURL, {})); + expect((service as any).dataService.findByHref).toHaveBeenCalledWith(requestURL); }); it('should return a RemoteData for the object with the given URL', () => {