1 import { async, 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 { CephfsClientsComponent } from './cephfs-clients.component';
11 describe('CephfsClientsComponent', () => {
12 let component: CephfsClientsComponent;
13 let fixture: ComponentFixture<CephfsClientsComponent>;
15 const fakeFilesystemService = {
17 return Observable.create((observer) => {
18 return () => console.log('disposed');
22 return Observable.create((observer) => {
23 return () => console.log('disposed');
28 beforeEach(async(() => {
29 TestBed.configureTestingModule({
30 imports: [RouterTestingModule, BsDropdownModule.forRoot(), SharedModule],
31 declarations: [CephfsClientsComponent],
32 providers: [{ provide: CephfsService, useValue: fakeFilesystemService }]
33 }).compileComponents();
37 fixture = TestBed.createComponent(CephfsClientsComponent);
38 component = fixture.componentInstance;
39 fixture.detectChanges();
42 it('should create', () => {
43 expect(component).toBeTruthy();