Update cloud-nodes-add-template.component.spec.ts

This commit is contained in:
piotrpekala7 2020-08-26 16:07:23 +02:00
parent 535a48211a
commit e33fe70a38

View File

@ -20,6 +20,8 @@ import { BuiltInTemplatesService } from '../../../../../services/built-in-templa
import { ToasterService } from '../../../../../services/toaster.service';
import { TemplateMocksService } from '../../../../../services/template-mocks.service';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { ComputeService } from '../../../../../services/compute.service';
import {MockedComputeService} from '../../../../preferences/vpcs/add-vpcs-template/add-vpcs-template.component.spec'
export class MockedBuiltInTemplatesService {
public addTemplate(server: Server, cloudTemplate: CloudTemplate) {
@ -34,6 +36,7 @@ describe('CloudNodesAddTemplateComponent', () => {
let mockedServerService = new MockedServerService;
let mockedBuiltInTemplatesService = new MockedBuiltInTemplatesService;
let mockedToasterService = new MockedToasterService;
let mockedComputeService = new MockedComputeService();
let activatedRoute = new MockedActivatedRoute().get();
beforeEach(async(() => {
@ -54,6 +57,7 @@ describe('CloudNodesAddTemplateComponent', () => {
{ provide: ServerService, useValue: mockedServerService },
{ provide: BuiltInTemplatesService, useValue: mockedBuiltInTemplatesService },
{ provide: ToasterService, useValue: mockedToasterService },
{ provide: ComputeService, useValue: mockedComputeService },
{ provide: TemplateMocksService, useClass: TemplateMocksService }
],
declarations: [