mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[CST-5307] Fixed test
This commit is contained in:
@@ -16,11 +16,6 @@ import { ProfilePageResearcherFormComponent } from './profile-page-researcher-fo
|
|||||||
import { ProfileClaimService } from '../profile-claim/profile-claim.service';
|
import { ProfileClaimService } from '../profile-claim/profile-claim.service';
|
||||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { AuthService } from 'src/app/core/auth/auth.service';
|
import { AuthService } from 'src/app/core/auth/auth.service';
|
||||||
import { EditItemDataService } from '../../core/submission/edititem-data.service';
|
|
||||||
import { createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils';
|
|
||||||
import { EditItemMode } from '../../core/submission/models/edititem-mode.model';
|
|
||||||
import { EditItem } from '../../core/submission/models/edititem.model';
|
|
||||||
import { createPaginatedList } from '../../shared/testing/utils.test';
|
|
||||||
|
|
||||||
describe('ProfilePageResearcherFormComponent', () => {
|
describe('ProfilePageResearcherFormComponent', () => {
|
||||||
|
|
||||||
@@ -39,17 +34,6 @@ describe('ProfilePageResearcherFormComponent', () => {
|
|||||||
|
|
||||||
let authService: AuthService;
|
let authService: AuthService;
|
||||||
|
|
||||||
let editItemDataService: any;
|
|
||||||
|
|
||||||
const editItemMode: EditItemMode = Object.assign(new EditItemMode(), {
|
|
||||||
name: 'test',
|
|
||||||
label: 'test'
|
|
||||||
});
|
|
||||||
|
|
||||||
const editItem: EditItem = Object.assign(new EditItem(), {
|
|
||||||
modes: createSuccessfulRemoteDataObject$(createPaginatedList([editItemMode]))
|
|
||||||
});
|
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
|
|
||||||
user = Object.assign(new EPerson(), {
|
user = Object.assign(new EPerson(), {
|
||||||
@@ -80,10 +64,6 @@ describe('ProfilePageResearcherFormComponent', () => {
|
|||||||
canClaimProfiles: observableOf(false),
|
canClaimProfiles: observableOf(false),
|
||||||
});
|
});
|
||||||
|
|
||||||
editItemDataService = jasmine.createSpyObj('EditItemDataService', {
|
|
||||||
findById: createSuccessfulRemoteDataObject$(editItem)
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
@@ -96,8 +76,7 @@ describe('ProfilePageResearcherFormComponent', () => {
|
|||||||
{ provide: ResearcherProfileService, useValue: researcherProfileService },
|
{ provide: ResearcherProfileService, useValue: researcherProfileService },
|
||||||
{ provide: NotificationsService, useValue: notificationsServiceStub },
|
{ provide: NotificationsService, useValue: notificationsServiceStub },
|
||||||
{ provide: ProfileClaimService, useValue: profileClaimService },
|
{ provide: ProfileClaimService, useValue: profileClaimService },
|
||||||
{ provide: AuthService, useValue: authService },
|
{ provide: AuthService, useValue: authService }
|
||||||
{ provide: EditItemDataService, useValue: editItemDataService }
|
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
Reference in New Issue
Block a user