]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/crud-form/formly-file-type/formly-file-type.component.spec.ts
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / forms / crud-form / formly-file-type / formly-file-type.component.spec.ts
CommitLineData
1e59de90
TL
1import { ComponentFixture, TestBed } from '@angular/core/testing';
2import { FormControl } from '@angular/forms';
3import { FormlyModule } from '@ngx-formly/core';
4
5import { FormlyFileTypeComponent } from './formly-file-type.component';
aee94f69 6import { configureTestBed } from '~/testing/unit-test-helper';
1e59de90
TL
7
8describe('FormlyFileTypeComponent', () => {
9 let component: FormlyFileTypeComponent;
10 let fixture: ComponentFixture<FormlyFileTypeComponent>;
11
aee94f69
TL
12 configureTestBed({
13 imports: [FormlyModule.forRoot()],
14 declarations: [FormlyFileTypeComponent]
1e59de90
TL
15 });
16
17 beforeEach(() => {
18 fixture = TestBed.createComponent(FormlyFileTypeComponent);
19 component = fixture.componentInstance;
20
21 const formControl = new FormControl();
22 const field = {
23 key: 'file',
24 type: 'file',
25 templateOptions: {},
26 get formControl() {
27 return formControl;
28 }
29 };
30
31 component.field = field;
32
33 fixture.detectChanges();
34 });
35
36 it('should create', () => {
37 expect(component).toBeTruthy();
38 });
39});