Files
dspace-angular/src/app/process-page/form/process-parameters/parameter-value-input/boolean-value-input/boolean-value-input.component.spec.ts
2020-06-29 22:17:41 +02:00

33 lines
957 B
TypeScript

import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { BooleanValueInputComponent } from './boolean-value-input.component';
import { DebugElement } from '@angular/core';
import { By } from '@angular/platform-browser';
describe('BooleanValueInputComponent', () => {
let component: BooleanValueInputComponent;
let fixture: ComponentFixture<BooleanValueInputComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [BooleanValueInputComponent]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(BooleanValueInputComponent);
component = fixture.componentInstance;
spyOn(component.updateValue, 'emit');
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should emit true onInit', () => {
expect(component.updateValue.emit).toHaveBeenCalledWith(true);
});
});