]> git.apps.os.sepia.ceph.com Git - ceph.git/blob
23bb679414b15241e1507f493c900371c428bdf5
[ceph.git] /
1 import { HttpClientTestingModule } from '@angular/common/http/testing';
2 import { ComponentFixture, TestBed } from '@angular/core/testing';
3 import { RouterTestingModule } from '@angular/router/testing';
4
5 import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
6
7 import { CdTableSelection } from '~/app/shared/models/cd-table-selection';
8 import { SummaryService } from '~/app/shared/services/summary.service';
9 import { SharedModule } from '~/app/shared/shared.module';
10 import { configureTestBed } from '~/testing/unit-test-helper';
11 import { ServiceDaemonListComponent } from '../service-daemon-list/service-daemon-list.component';
12 import { ServiceDetailsComponent } from './service-details.component';
13
14 describe('ServiceDetailsComponent', () => {
15   let component: ServiceDetailsComponent;
16   let fixture: ComponentFixture<ServiceDetailsComponent>;
17
18   configureTestBed({
19     imports: [HttpClientTestingModule, RouterTestingModule, SharedModule, NgbNavModule],
20     declarations: [ServiceDetailsComponent, ServiceDaemonListComponent],
21     providers: [{ provide: SummaryService, useValue: { subscribeOnce: jest.fn() } }]
22   });
23
24   beforeEach(() => {
25     fixture = TestBed.createComponent(ServiceDetailsComponent);
26     component = fixture.componentInstance;
27     component.selection = new CdTableSelection();
28   });
29
30   it('should create', () => {
31     fixture.detectChanges();
32     expect(component).toBeTruthy();
33   });
34 });