1 import { ComponentFixture, TestBed } from '@angular/core/testing';
2 import { RouterTestingModule } from '@angular/router/testing';
4 import { BsDropdownModule } from 'ngx-bootstrap';
5 import { Observable } from 'rxjs';
7 import { CephfsService } from '../../../shared/api/cephfs.service';
8 import { SharedModule } from '../../../shared/shared.module';
9 import { configureTestBed } from '../../../shared/unit-test-helper';
10 import { CephfsClientsComponent } from './cephfs-clients.component';
12 describe('CephfsClientsComponent', () => {
13 let component: CephfsClientsComponent;
14 let fixture: ComponentFixture<CephfsClientsComponent>;
16 const fakeFilesystemService = {
18 return Observable.create((observer) => {
19 return () => console.log('disposed');
23 return Observable.create((observer) => {
24 return () => console.log('disposed');
30 imports: [RouterTestingModule, BsDropdownModule.forRoot(), SharedModule],
31 declarations: [CephfsClientsComponent],
32 providers: [{ provide: CephfsService, useValue: fakeFilesystemService }]
36 fixture = TestBed.createComponent(CephfsClientsComponent);
37 component = fixture.componentInstance;
38 fixture.detectChanges();
41 it('should create', () => {
42 expect(component).toBeTruthy();