1 import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
2 import { TestBed } from '@angular/core/testing';
4 import { configureTestBed } from '~/testing/unit-test-helper';
5 import { OrchestratorService } from './orchestrator.service';
7 describe('OrchestratorService', () => {
8 let service: OrchestratorService;
9 let httpTesting: HttpTestingController;
10 const apiPath = 'api/orchestrator';
13 providers: [OrchestratorService],
14 imports: [HttpClientTestingModule]
18 service = TestBed.inject(OrchestratorService);
19 httpTesting = TestBed.inject(HttpTestingController);
26 it('should be created', () => {
27 expect(service).toBeTruthy();
30 it('should call status', () => {
31 service.status().subscribe();
32 const req = httpTesting.expectOne(`${apiPath}/status`);
33 expect(req.request.method).toBe('GET');