create-item-parent-selector.component.spec.ts (dspace-angular-dspace-7.0) | : | create-item-parent-selector.component.spec.ts (dspace-angular-dspace-7.1) | ||
---|---|---|---|---|
skipping to change at line 72 | skipping to change at line 72 | |||
it('should create', () => { | it('should create', () => { | |||
expect(component).toBeTruthy(); | expect(component).toBeTruthy(); | |||
}); | }); | |||
it('should call navigate on the router with the correct create path when navig ate is called', () => { | it('should call navigate on the router with the correct create path when navig ate is called', () => { | |||
component.navigate(collection); | component.navigate(collection); | |||
expect(router.navigate).toHaveBeenCalledWith(['/submit'], { queryParams: { c ollection: collection.uuid } }); | expect(router.navigate).toHaveBeenCalledWith(['/submit'], { queryParams: { c ollection: collection.uuid } }); | |||
}); | }); | |||
it('should call navigate on the router with entityType parameter', () => { | ||||
const entityType = 'Person'; | ||||
component.entityType = entityType; | ||||
component.navigate(collection); | ||||
expect(router.navigate).toHaveBeenCalledWith(['/submit'], { queryParams: { c | ||||
ollection: collection.uuid, entityType: entityType } }); | ||||
}); | ||||
}); | }); | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 7 lines changed or added |