mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-12 20:43:08 +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 { ConfigurationDataService } from '../../../core/data/configuration-data.service';
|
||||
import { ConfigurationProperty } from '../../../core/shared/configuration-property.model';
|
||||
import { OrcidAuthService } from '../../../core/orcid/orcid-auth.service';
|
||||
|
||||
let mockIdentifierDataService: IdentifierDataService;
|
||||
let mockConfigurationDataService: ConfigurationDataService;
|
||||
@@ -57,12 +58,18 @@ describe('ItemStatusComponent', () => {
|
||||
};
|
||||
|
||||
let authorizationService: AuthorizationDataService;
|
||||
let orcidAuthService: any;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
authorizationService = jasmine.createSpyObj('authorizationService', {
|
||||
isAuthorized: observableOf(true)
|
||||
});
|
||||
|
||||
orcidAuthService = jasmine.createSpyObj('OrcidAuthService', {
|
||||
onlyAdminCanDisconnectProfileFromOrcid: observableOf ( true ),
|
||||
isLinkedToOrcid: true
|
||||
});
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||
declarations: [ItemStatusComponent],
|
||||
@@ -71,7 +78,8 @@ describe('ItemStatusComponent', () => {
|
||||
{ provide: HostWindowService, useValue: new HostWindowServiceStub(0) },
|
||||
{ provide: AuthorizationDataService, useValue: authorizationService },
|
||||
{ provide: IdentifierDataService, useValue: mockIdentifierDataService },
|
||||
{ provide: ConfigurationDataService, useValue: mockConfigurationDataService }
|
||||
{ provide: ConfigurationDataService, useValue: mockConfigurationDataService },
|
||||
{ provide: OrcidAuthService, useValue: orcidAuthService },
|
||||
], schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
Reference in New Issue
Block a user