Started fixing tests

This commit is contained in:
lotte
2018-12-21 16:22:59 +01:00
parent 42d1bdb3d8
commit d37a2e051d
31 changed files with 351 additions and 226 deletions

View File

@@ -350,13 +350,13 @@ describe('FormComponent test suite', () => {
const control = formComp.formGroup.get(['dc_title']);
control.setValue('Test Title');
formState.testForm.valid = true;
spyOn(formComp.submit, 'emit');
spyOn(formComp.submitForm, 'emit');
form.next(formState.testForm);
formFixture.detectChanges();
formComp.onSubmit();
expect(formComp.submit.emit).toHaveBeenCalled();
expect(formComp.submitForm.emit).toHaveBeenCalled();
});
it('should not emit submit Event on form submit whether the form is not valid', () => {