summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/rules-list/rules-list.component.spec.ts
blob: ada139e6d1d0089732ef783fbe95993d8c4e0533 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';

import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
import { ToastrModule } from 'ngx-toastr';

import { PrometheusService } from '~/app/shared/api/prometheus.service';
import { SettingsService } from '~/app/shared/api/settings.service';
import { SharedModule } from '~/app/shared/shared.module';
import { configureTestBed } from '~/testing/unit-test-helper';
import { PrometheusTabsComponent } from '../prometheus-tabs/prometheus-tabs.component';
import { RulesListComponent } from './rules-list.component';

describe('RulesListComponent', () => {
  let component: RulesListComponent;
  let fixture: ComponentFixture<RulesListComponent>;

  configureTestBed({
    declarations: [RulesListComponent, PrometheusTabsComponent],
    imports: [
      HttpClientTestingModule,
      SharedModule,
      NgbNavModule,
      RouterTestingModule,
      ToastrModule.forRoot()
    ],
    providers: [PrometheusService, SettingsService]
  });

  beforeEach(() => {
    fixture = TestBed.createComponent(RulesListComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});