mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-02-21 02:01:19 +00:00
Update log-console.component.spec.ts
This commit is contained in:
parent
8ffbf1be30
commit
4bab23fa60
@ -13,6 +13,7 @@ import { LogEventsDataSource } from './log-events-datasource';
|
||||
import { HttpServer, ServerErrorHandler } from '../../../services/http-server.service';
|
||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { NodeConsoleService } from '../../../services/nodeConsole.service';
|
||||
|
||||
export class MockedProjectWebServiceHandler {
|
||||
public nodeNotificationEmitter = new EventEmitter<WebServiceMessage>();
|
||||
@ -41,7 +42,8 @@ describe('LogConsoleComponent', () => {
|
||||
{ provide: NodeService, useValue: mockedNodeService },
|
||||
{ provide: NodesDataSource, useValue: mockedNodesDataSource },
|
||||
{ provide: LogEventsDataSource, useClass: LogEventsDataSource },
|
||||
{ provide: HttpServer, useValue: httpServer }
|
||||
{ provide: HttpServer, useValue: httpServer },
|
||||
{ provide: NodeConsoleService }
|
||||
],
|
||||
declarations: [LogConsoleComponent],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
@ -74,7 +76,7 @@ describe('LogConsoleComponent', () => {
|
||||
|
||||
component.handleCommand();
|
||||
|
||||
expect(component.showMessage).toHaveBeenCalledWith({type: 'command', message: 'Current version: 2020.3.0-beta.2'});
|
||||
expect(component.showMessage).toHaveBeenCalledWith({type: 'command', message: 'Current version: 2020.3.0-beta.4'});
|
||||
});
|
||||
|
||||
it('should call show message when unknown command entered', () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user