Update add-blank-project-dialog.component.spec.ts

This commit is contained in:
piotrpekala7 2020-02-28 15:17:09 +01:00
parent 7598cfffcd
commit 487eda0dee

View File

@ -16,6 +16,7 @@ import { ToasterService } from '../../../services/toaster.service';
import { of } from 'rxjs/internal/observable/of'; import { of } from 'rxjs/internal/observable/of';
import { Project } from '../../../models/project'; import { Project } from '../../../models/project';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { projectNameAsyncValidator } from '../../../validators/project-name-async-validator';
export class MockedProjectService { export class MockedProjectService {
public projects: Project[] = [ public projects: Project[] = [
@ -98,7 +99,6 @@ describe('AddBlankProjectDialogComponent', () => {
fixture = TestBed.createComponent(AddBlankProjectDialogComponent); fixture = TestBed.createComponent(AddBlankProjectDialogComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
component.server = server; component.server = server;
component.projectNameForm.controls['projectName'].setValue('ValidName');
fixture.detectChanges(); fixture.detectChanges();
}); });
@ -109,6 +109,7 @@ describe('AddBlankProjectDialogComponent', () => {
it('should call adding project when name is valid', () => { it('should call adding project when name is valid', () => {
spyOn(component, 'addProject'); spyOn(component, 'addProject');
component.projectNameForm.controls['projectName'].setValue('ValidName');
component.onAddClick(); component.onAddClick();