]> git.apps.os.sepia.ceph.com Git - ceph.git/blob
1aacea538b932268b8b3f3777baf581a63819701
[ceph.git] /
1 import { ComponentFixture, TestBed } from '@angular/core/testing';
2
3 import { TabsModule } from 'ngx-bootstrap/tabs';
4
5 import { RgwDaemonService } from '../../../shared/api/rgw-daemon.service';
6 import { CdTableSelection } from '../../../shared/models/cd-table-selection';
7 import { SharedModule } from '../../../shared/shared.module';
8 import { configureTestBed } from '../../../shared/unit-test-helper';
9 import { PerformanceCounterModule } from '../../performance-counter/performance-counter.module';
10 import { RgwDaemonDetailsComponent } from './rgw-daemon-details.component';
11
12 describe('RgwDaemonDetailsComponent', () => {
13   let component: RgwDaemonDetailsComponent;
14   let fixture: ComponentFixture<RgwDaemonDetailsComponent>;
15
16   const fakeRgwDaemonService = {
17     get: (id: string) => {
18       return new Promise(function(resolve) {
19         resolve([]);
20       });
21     }
22   };
23
24   configureTestBed({
25     declarations: [RgwDaemonDetailsComponent],
26     imports: [SharedModule, PerformanceCounterModule, TabsModule.forRoot()],
27     providers: [{ provide: RgwDaemonService, useValue: fakeRgwDaemonService }]
28   });
29
30   beforeEach(() => {
31     fixture = TestBed.createComponent(RgwDaemonDetailsComponent);
32     component = fixture.componentInstance;
33     component.selection = new CdTableSelection();
34     fixture.detectChanges();
35   });
36
37   it('should create', () => {
38     expect(component).toBeTruthy();
39   });
40 });