]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-details/service-details.component.spec.ts
import quincy beta 17.1.0
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / cluster / services / service-details / service-details.component.spec.ts
CommitLineData
9f95a23c
TL
1import { HttpClientTestingModule } from '@angular/common/http/testing';
2import { ComponentFixture, TestBed } from '@angular/core/testing';
1911f103
TL
3import { RouterTestingModule } from '@angular/router/testing';
4
f67539c2
TL
5import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
6import { NgxPipeFunctionModule } from 'ngx-pipe-function';
20effc67 7import { ToastrModule } from 'ngx-toastr';
9f95a23c 8
f67539c2
TL
9import { CdTableSelection } from '~/app/shared/models/cd-table-selection';
10import { SummaryService } from '~/app/shared/services/summary.service';
11import { SharedModule } from '~/app/shared/shared.module';
12import { configureTestBed } from '~/testing/unit-test-helper';
1911f103 13import { ServiceDaemonListComponent } from '../service-daemon-list/service-daemon-list.component';
9f95a23c
TL
14import { ServiceDetailsComponent } from './service-details.component';
15
16describe('ServiceDetailsComponent', () => {
17 let component: ServiceDetailsComponent;
18 let fixture: ComponentFixture<ServiceDetailsComponent>;
19
20 configureTestBed({
f67539c2
TL
21 imports: [
22 HttpClientTestingModule,
23 RouterTestingModule,
24 SharedModule,
25 NgbNavModule,
20effc67
TL
26 NgxPipeFunctionModule,
27 ToastrModule.forRoot()
f67539c2 28 ],
1911f103 29 declarations: [ServiceDetailsComponent, ServiceDaemonListComponent],
f67539c2 30 providers: [{ provide: SummaryService, useValue: { subscribeOnce: jest.fn() } }]
9f95a23c
TL
31 });
32
33 beforeEach(() => {
34 fixture = TestBed.createComponent(ServiceDetailsComponent);
35 component = fixture.componentInstance;
36 component.selection = new CdTableSelection();
9f95a23c
TL
37 });
38
39 it('should create', () => {
1911f103 40 fixture.detectChanges();
9f95a23c
TL
41 expect(component).toBeTruthy();
42 });
9f95a23c 43});