mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
[TLC-249] Further test fixes
This commit is contained in:
@@ -45,7 +45,8 @@ describe('ItemRegisterDoiComponent', () => {
|
|||||||
|
|
||||||
mockIdentifierDataService = jasmine.createSpyObj('mockIdentifierDataService', {
|
mockIdentifierDataService = jasmine.createSpyObj('mockIdentifierDataService', {
|
||||||
getIdentifierDataFor: createSuccessfulRemoteDataObject$({'identifiers': []}),
|
getIdentifierDataFor: createSuccessfulRemoteDataObject$({'identifiers': []}),
|
||||||
getIdentifierRegistrationConfiguration: createSuccessfulRemoteDataObject$('true')
|
getIdentifierRegistrationConfiguration: createSuccessfulRemoteDataObject$('true'),
|
||||||
|
registerIdentifier: createSuccessfulRemoteDataObject$({'identifiers': []}),
|
||||||
});
|
});
|
||||||
|
|
||||||
mockItemDataService = jasmine.createSpyObj('mockItemDataService', {
|
mockItemDataService = jasmine.createSpyObj('mockItemDataService', {
|
||||||
@@ -98,7 +99,7 @@ describe('ItemRegisterDoiComponent', () => {
|
|||||||
it('should call registerDOI function from the ItemDataService', () => {
|
it('should call registerDOI function from the ItemDataService', () => {
|
||||||
spyOn(comp, 'processRestResponse');
|
spyOn(comp, 'processRestResponse');
|
||||||
comp.performAction();
|
comp.performAction();
|
||||||
expect(mockItemDataService.registerDOI).toHaveBeenCalledWith(comp.item.id);
|
expect(mockIdentifierDataService.registerIdentifier).toHaveBeenCalledWith(comp.item, 'doi');
|
||||||
expect(comp.processRestResponse).toHaveBeenCalled();
|
expect(comp.processRestResponse).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user