]> git.apps.os.sepia.ceph.com Git - ceph.git/blob
80cdf927b9a7ba4bf1af534267d81ead3a6ddb2b
[ceph.git] /
1 import { HttpClientTestingModule } from '@angular/common/http/testing';
2 import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
3 import { ComponentFixture, TestBed } from '@angular/core/testing';
4
5 import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
6
7 import { SharedModule } from '~/app/shared/shared.module';
8 import { NvmeofSubsystemsDetailsComponent } from './nvmeof-subsystems-details.component';
9
10 describe('NvmeofSubsystemsDetailsComponent', () => {
11   let component: NvmeofSubsystemsDetailsComponent;
12   let fixture: ComponentFixture<NvmeofSubsystemsDetailsComponent>;
13
14   beforeEach(async () => {
15     await TestBed.configureTestingModule({
16       declarations: [NvmeofSubsystemsDetailsComponent],
17       imports: [BrowserAnimationsModule, SharedModule, HttpClientTestingModule, NgbNavModule]
18     }).compileComponents();
19
20     fixture = TestBed.createComponent(NvmeofSubsystemsDetailsComponent);
21     component = fixture.componentInstance;
22     component.selection = {
23       serial_number: 'Ceph30487186726692',
24       model_number: 'Ceph bdev Controller',
25       min_cntlid: 1,
26       max_cntlid: 2040,
27       subtype: 'NVMe',
28       nqn: 'nqn.2001-07.com.ceph:1720603703820',
29       namespace_count: 1,
30       max_namespaces: 256
31     };
32     component.ngOnChanges();
33     fixture.detectChanges();
34   });
35
36   it('should create', () => {
37     expect(component).toBeTruthy();
38   });
39
40   it('should prepare data', () => {
41     expect(component.data).toEqual({
42       'Serial Number': 'Ceph30487186726692',
43       'Model Number': 'Ceph bdev Controller',
44       'Minimum Controller Identifier': 1,
45       'Maximum Controller Identifier': 2040,
46       'Subsystem Type': 'NVMe'
47     });
48   });
49 });