diff options
Diffstat (limited to 'src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-setting/iscsi-setting.component.spec.ts')
-rw-r--r-- | src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-setting/iscsi-setting.component.spec.ts | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-setting/iscsi-setting.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-setting/iscsi-setting.component.spec.ts new file mode 100644 index 000000000..19aee4df3 --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-setting/iscsi-setting.component.spec.ts @@ -0,0 +1,37 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { FormControl, NgForm, ReactiveFormsModule } from '@angular/forms'; + +import { CdFormGroup } from '~/app/shared/forms/cd-form-group'; +import { SharedModule } from '~/app/shared/shared.module'; +import { configureTestBed } from '~/testing/unit-test-helper'; +import { IscsiSettingComponent } from './iscsi-setting.component'; + +describe('IscsiSettingComponent', () => { + let component: IscsiSettingComponent; + let fixture: ComponentFixture<IscsiSettingComponent>; + + configureTestBed({ + imports: [SharedModule, ReactiveFormsModule], + declarations: [IscsiSettingComponent] + }); + + beforeEach(() => { + fixture = TestBed.createComponent(IscsiSettingComponent); + component = fixture.componentInstance; + component.settingsForm = new CdFormGroup({ + max_data_area_mb: new FormControl() + }); + component.formDir = new NgForm([], []); + component.setting = 'max_data_area_mb'; + component.limits = { + type: 'int', + min: 1, + max: 2048 + }; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); |