diff --git a/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.spec.ts b/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.spec.ts index d090d12099..8180db9f73 100644 --- a/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.spec.ts +++ b/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.spec.ts @@ -143,17 +143,27 @@ describe('ClaimedTaskActionsRejectComponent', () => { expect(component.startActionExecution).toHaveBeenCalled(); }); - describe('actionExecution', () => { - beforeEach(() => { - component.actionExecution().subscribe(); - fixture.detectChanges(); - }); + }); - it('should call claimedTaskService\'s submitTask', () => { - expect(claimedTaskService.submitTask).toHaveBeenCalledWith(object.id, expectedBody) - }); + describe('actionExecution', () => { + + let expectedBody; + + beforeEach(() => { + spyOn((component.rejectForm as any), 'get').and.returnValue({value: 'required'}); + + expectedBody = { + [component.option]: 'true', + reason: 'required' + }; + + component.actionExecution().subscribe(); + fixture.detectChanges(); }); + it('should call claimedTaskService\'s submitTask with the proper reason', () => { + expect(claimedTaskService.submitTask).toHaveBeenCalledWith(object.id, expectedBody) + }); }); describe('reloadObjectExecution', () => { diff --git a/src/environments/environment.common.ts b/src/environments/environment.common.ts index f107e79c97..eb961a38eb 100644 --- a/src/environments/environment.common.ts +++ b/src/environments/environment.common.ts @@ -22,9 +22,9 @@ export const environment: GlobalConfig = { // The REST API server settings. // NOTE: these must be "synced" with the 'dspace.server.url' setting in your backend's local.cfg. rest: { - ssl: false, - host: 'localhost', - port: 8080, + ssl: true, + host: 'dspace7.4science.cloud', + port: 443, // NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript nameSpace: '/server', },