71429: Test fixes

This commit is contained in:
Kristof De Langhe
2020-06-24 16:08:10 +02:00
parent 080ddf8a1f
commit 882ff3ea18
3 changed files with 4 additions and 5 deletions

View File

@@ -114,7 +114,7 @@ describe('EPersonFormComponent', () => {
translateService = getMockTranslateService();
authService = new AuthServiceStub();
authorizationService = jasmine.createSpyObj('authorizationService', {
isAuthenticated: observableOf(true)
isAuthorized: observableOf(true)
});
groupsDataService = jasmine.createSpyObj('groupsDataService', {
findAllByHref: createSuccessfulRemoteDataObject$(createPaginatedList([])),

View File

@@ -9,7 +9,6 @@ import { CSSVariableService } from '../../shared/sass-helper/sass-helper.service
import { CSSVariableServiceStub } from '../../shared/testing/css-variable-service.stub';
import { AuthServiceStub } from '../../shared/testing/auth-service.stub';
import { AuthService } from '../../core/auth/auth.service';
import { of as observableOf } from 'rxjs';
import { By } from '@angular/platform-browser';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
@@ -25,7 +24,7 @@ describe('AdminSidebarComponent', () => {
beforeEach(async(() => {
authorizationService = jasmine.createSpyObj('authorizationService', {
isAuthenticated: observableOf(true)
isAuthorized: observableOf(true)
});
TestBed.configureTestingModule({
imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule],

View File

@@ -45,10 +45,10 @@ describe('FeatureAuthorizationGuard', () => {
ePersonUuid = 'fake-eperson-uuid';
authorizationService = jasmine.createSpyObj('authorizationService', {
isAuthenticated: observableOf(true)
isAuthorized: observableOf(true)
});
router = jasmine.createSpyObj('router', {
navigateByUrl: {}
parseUrl: {}
});
guard = new FeatureAuthorizationGuardImpl(authorizationService, router, featureId, objectUrl, ePersonUuid);
}