mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-13 04:53:06 +00:00
Cache redesign part 1, and add support for alternative links
This commit is contained in:
@@ -22,6 +22,7 @@ import {
|
||||
END_USER_AGREEMENT_METADATA_FIELD,
|
||||
EndUserAgreementService
|
||||
} from '../../core/end-user-agreement/end-user-agreement.service';
|
||||
import { createFailedRemoteDataObject$, createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils';
|
||||
|
||||
describe('CreateProfileComponent', () => {
|
||||
let comp: CreateProfileComponent;
|
||||
@@ -111,7 +112,7 @@ describe('CreateProfileComponent', () => {
|
||||
notificationsService = new NotificationsServiceStub();
|
||||
|
||||
ePersonDataService = jasmine.createSpyObj('ePersonDataService', {
|
||||
createEPersonForToken: observableOf(new RestResponse(true, 200, 'Success'))
|
||||
createEPersonForToken: createSuccessfulRemoteDataObject$({})
|
||||
});
|
||||
|
||||
store = jasmine.createSpyObj('store', {
|
||||
@@ -218,7 +219,7 @@ describe('CreateProfileComponent', () => {
|
||||
|
||||
it('should submit an eperson for creation and stay on page on error', () => {
|
||||
|
||||
(ePersonDataService.createEPersonForToken as jasmine.Spy).and.returnValue(observableOf(new RestResponse(false, 500, 'Error')));
|
||||
(ePersonDataService.createEPersonForToken as jasmine.Spy).and.returnValue(createFailedRemoteDataObject$('Error', 500));
|
||||
|
||||
comp.firstName.patchValue('First');
|
||||
comp.lastName.patchValue('Last');
|
||||
@@ -236,7 +237,7 @@ describe('CreateProfileComponent', () => {
|
||||
});
|
||||
it('should submit not create an eperson when the user info form is invalid', () => {
|
||||
|
||||
(ePersonDataService.createEPersonForToken as jasmine.Spy).and.returnValue(observableOf(new RestResponse(false, 500, 'Error')));
|
||||
(ePersonDataService.createEPersonForToken as jasmine.Spy).and.returnValue(createFailedRemoteDataObject$('Error', 500));
|
||||
|
||||
comp.firstName.patchValue('');
|
||||
comp.lastName.patchValue('Last');
|
||||
@@ -251,7 +252,7 @@ describe('CreateProfileComponent', () => {
|
||||
});
|
||||
it('should submit not create an eperson when the password is invalid', () => {
|
||||
|
||||
(ePersonDataService.createEPersonForToken as jasmine.Spy).and.returnValue(observableOf(new RestResponse(false, 500, 'Error')));
|
||||
(ePersonDataService.createEPersonForToken as jasmine.Spy).and.returnValue(createFailedRemoteDataObject$('Error', 500));
|
||||
|
||||
comp.firstName.patchValue('First');
|
||||
comp.lastName.patchValue('Last');
|
||||
|
Reference in New Issue
Block a user