Files
dspace-angular/src/app/+community-page/edit-community-page/community-metadata/community-metadata.component.spec.ts
Kristof De Langhe 0cd8a4ebcd Merge branch 'w2p-63669_Edit-Col/Com-Tabs' into w2p-65240_Community-and-collection-logos
Conflicts:
	resources/i18n/en.json5
	src/app/+collection-page/edit-collection-page/edit-collection-page.component.html
	src/app/+collection-page/edit-collection-page/edit-collection-page.component.spec.ts
	src/app/+collection-page/edit-collection-page/edit-collection-page.component.ts
	src/app/+community-page/edit-community-page/edit-community-page.component.html
	src/app/+community-page/edit-community-page/edit-community-page.component.spec.ts
	src/app/+community-page/edit-community-page/edit-community-page.component.ts
	src/app/shared/comcol-forms/edit-comcol-page/edit-comcol-page.component.spec.ts
	src/app/shared/comcol-forms/edit-comcol-page/edit-comcol-page.component.ts
2019-10-07 13:39:53 +02:00

43 lines
1.8 KiB
TypeScript

import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TranslateModule } from '@ngx-translate/core';
import { SharedModule } from '../../../shared/shared.module';
import { CommonModule } from '@angular/common';
import { RouterTestingModule } from '@angular/router/testing';
import { ActivatedRoute } from '@angular/router';
import { of as observableOf } from 'rxjs/internal/observable/of';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { CommunityMetadataComponent } from './community-metadata.component';
import { CommunityDataService } from '../../../core/data/community-data.service';
import { NotificationsService } from '../../../shared/notifications/notifications.service';
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service-stub';
describe('CommunityMetadataComponent', () => {
let comp: CommunityMetadataComponent;
let fixture: ComponentFixture<CommunityMetadataComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [TranslateModule.forRoot(), SharedModule, CommonModule, RouterTestingModule],
declarations: [CommunityMetadataComponent],
providers: [
{ provide: CommunityDataService, useValue: {} },
{ provide: ActivatedRoute, useValue: { parent: { data: observableOf({ dso: { payload: {} } }) } } },
{ provide: NotificationsService, useValue: new NotificationsServiceStub() }
],
schemas: [NO_ERRORS_SCHEMA]
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CommunityMetadataComponent);
comp = fixture.componentInstance;
fixture.detectChanges();
});
describe('frontendURL', () => {
it('should have the right frontendURL set', () => {
expect((comp as any).frontendURL).toEqual('/communities/');
})
});
});