diff options
Diffstat (limited to 'src/pybind/mgr/dashboard/frontend/src/app/shared/forms/crud-form/formly-file-type/formly-file-type.component.spec.ts')
-rw-r--r-- | src/pybind/mgr/dashboard/frontend/src/app/shared/forms/crud-form/formly-file-type/formly-file-type.component.spec.ts | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/crud-form/formly-file-type/formly-file-type.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/crud-form/formly-file-type/formly-file-type.component.spec.ts new file mode 100644 index 000000000..d2c34818d --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/crud-form/formly-file-type/formly-file-type.component.spec.ts @@ -0,0 +1,39 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { FormControl } from '@angular/forms'; +import { FormlyModule } from '@ngx-formly/core'; + +import { FormlyFileTypeComponent } from './formly-file-type.component'; +import { configureTestBed } from '~/testing/unit-test-helper'; + +describe('FormlyFileTypeComponent', () => { + let component: FormlyFileTypeComponent; + let fixture: ComponentFixture<FormlyFileTypeComponent>; + + configureTestBed({ + imports: [FormlyModule.forRoot()], + declarations: [FormlyFileTypeComponent] + }); + + beforeEach(() => { + fixture = TestBed.createComponent(FormlyFileTypeComponent); + component = fixture.componentInstance; + + const formControl = new FormControl(); + const field = { + key: 'file', + type: 'file', + templateOptions: {}, + get formControl() { + return formControl; + } + }; + + component.field = field; + + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); |