fix findByHref test

This commit is contained in:
Art Lowel
2020-02-04 15:59:30 +01:00
parent 3331a72b02
commit 89b3d2c40e

View File

@@ -53,15 +53,17 @@ describe('ResourcePolicyService', () => {
notificationsService, notificationsService,
http, http,
comparator comparator
) );
spyOn((service as any).dataService, 'findByHref').and.callThrough();
}); });
describe('findByHref', () => { describe('findByHref', () => {
it('should configure the proper GetRequest', () => { it('should proxy the call to dataservice.findByHref', () => {
scheduler.schedule(() => service.findByHref(requestURL)); scheduler.schedule(() => service.findByHref(requestURL));
scheduler.flush(); scheduler.flush();
expect(requestService.configure).toHaveBeenCalledWith(new GetRequest(requestUUID, requestURL, {})); expect((service as any).dataService.findByHref).toHaveBeenCalledWith(requestURL);
}); });
it('should return a RemoteData<ResourcePolicy> for the object with the given URL', () => { it('should return a RemoteData<ResourcePolicy> for the object with the given URL', () => {