mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-16 06:23:03 +00:00
69115: ClaimedTaskDataService and components refactoring
This commit is contained in:
@@ -52,8 +52,7 @@ describe('ClaimedTaskDataService', () => {
|
||||
options.headers = headers;
|
||||
});
|
||||
|
||||
describe('approveTask', () => {
|
||||
|
||||
describe('submitTask', () => {
|
||||
it('should call postToEndpoint method', () => {
|
||||
const scopeId = '1234';
|
||||
const body = {
|
||||
@@ -63,33 +62,13 @@ describe('ClaimedTaskDataService', () => {
|
||||
spyOn(service, 'postToEndpoint');
|
||||
requestService.uriEncodeBody.and.returnValue(body);
|
||||
|
||||
service.approveTask(scopeId);
|
||||
|
||||
expect(service.postToEndpoint).toHaveBeenCalledWith(linkPath, body, scopeId, options);
|
||||
});
|
||||
});
|
||||
|
||||
describe('rejectTask', () => {
|
||||
|
||||
it('should call postToEndpoint method', () => {
|
||||
const scopeId = '1234';
|
||||
const reason = 'test reject';
|
||||
const body = {
|
||||
submit_reject: 'true',
|
||||
reason
|
||||
};
|
||||
|
||||
spyOn(service, 'postToEndpoint');
|
||||
requestService.uriEncodeBody.and.returnValue(body);
|
||||
|
||||
service.rejectTask(reason, scopeId);
|
||||
service.submitTask(scopeId, body);
|
||||
|
||||
expect(service.postToEndpoint).toHaveBeenCalledWith(linkPath, body, scopeId, options);
|
||||
});
|
||||
});
|
||||
|
||||
describe('returnToPoolTask', () => {
|
||||
|
||||
it('should call deleteById method', () => {
|
||||
const scopeId = '1234';
|
||||
|
||||
|
Reference in New Issue
Block a user