mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-13 04:53:06 +00:00

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
dd554590b1
commit
651b6a7d76
@@ -16,6 +16,7 @@ import { AuthorizationDataService } from '../../../core/data/feature-authorizati
|
|||||||
import { IdentifierDataService } from '../../../core/data/identifier-data.service';
|
import { IdentifierDataService } from '../../../core/data/identifier-data.service';
|
||||||
import { ConfigurationDataService } from '../../../core/data/configuration-data.service';
|
import { ConfigurationDataService } from '../../../core/data/configuration-data.service';
|
||||||
import { ConfigurationProperty } from '../../../core/shared/configuration-property.model';
|
import { ConfigurationProperty } from '../../../core/shared/configuration-property.model';
|
||||||
|
import { OrcidAuthService } from '../../../core/orcid/orcid-auth.service';
|
||||||
|
|
||||||
let mockIdentifierDataService: IdentifierDataService;
|
let mockIdentifierDataService: IdentifierDataService;
|
||||||
let mockConfigurationDataService: ConfigurationDataService;
|
let mockConfigurationDataService: ConfigurationDataService;
|
||||||
@@ -57,12 +58,18 @@ describe('ItemStatusComponent', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let authorizationService: AuthorizationDataService;
|
let authorizationService: AuthorizationDataService;
|
||||||
|
let orcidAuthService: any;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
authorizationService = jasmine.createSpyObj('authorizationService', {
|
authorizationService = jasmine.createSpyObj('authorizationService', {
|
||||||
isAuthorized: observableOf(true)
|
isAuthorized: observableOf(true)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
orcidAuthService = jasmine.createSpyObj('OrcidAuthService', {
|
||||||
|
onlyAdminCanDisconnectProfileFromOrcid: observableOf ( true ),
|
||||||
|
isLinkedToOrcid: true
|
||||||
|
});
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [ItemStatusComponent],
|
declarations: [ItemStatusComponent],
|
||||||
@@ -71,7 +78,8 @@ describe('ItemStatusComponent', () => {
|
|||||||
{ provide: HostWindowService, useValue: new HostWindowServiceStub(0) },
|
{ provide: HostWindowService, useValue: new HostWindowServiceStub(0) },
|
||||||
{ provide: AuthorizationDataService, useValue: authorizationService },
|
{ provide: AuthorizationDataService, useValue: authorizationService },
|
||||||
{ provide: IdentifierDataService, useValue: mockIdentifierDataService },
|
{ provide: IdentifierDataService, useValue: mockIdentifierDataService },
|
||||||
{ provide: ConfigurationDataService, useValue: mockConfigurationDataService }
|
{ provide: ConfigurationDataService, useValue: mockConfigurationDataService },
|
||||||
|
{ provide: OrcidAuthService, useValue: orcidAuthService },
|
||||||
], schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
], schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}));
|
||||||
|
Reference in New Issue
Block a user