mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00

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
43 lines
1.8 KiB
TypeScript
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/');
|
|
})
|
|
});
|
|
});
|