mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-01-20 11:38:59 +00:00
Update add-blank-project-dialog.component.spec.ts
This commit is contained in:
parent
7598cfffcd
commit
487eda0dee
@ -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();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user