]> git.apps.os.sepia.ceph.com Git - ceph.git/blob
4ac81a1b77e7cf51a1242952067ddd4adf22891a
[ceph.git] /
1 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 import { FormsModule } from '@angular/forms';
3
4 import { TabsModule } from 'ngx-bootstrap/tabs/tabs.module';
5 import { Observable } from 'rxjs/Observable';
6
7 import { ConfigurationService } from '../../../shared/api/configuration.service';
8 import { SharedModule } from '../../../shared/shared.module';
9 import { ConfigurationComponent } from './configuration.component';
10
11 describe('ConfigurationComponent', () => {
12   let component: ConfigurationComponent;
13   let fixture: ComponentFixture<ConfigurationComponent>;
14
15   const fakeService = {
16     getConfigData: () => {
17       return Observable.create(observer => {
18         return () => console.log('disposed');
19       });
20     }
21   };
22
23   beforeEach(
24     async(() => {
25       TestBed.configureTestingModule({
26         declarations: [ConfigurationComponent],
27         providers: [{ provide: ConfigurationService, useValue: fakeService }],
28         imports: [SharedModule, FormsModule, TabsModule.forRoot()]
29       }).compileComponents();
30     })
31   );
32
33   beforeEach(() => {
34     fixture = TestBed.createComponent(ConfigurationComponent);
35     component = fixture.componentInstance;
36     fixture.detectChanges();
37   });
38
39   it('should create', () => {
40     expect(component).toBeTruthy();
41   });
42 });