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 { ScopeService } from './scope.service';
7 describe('ScopeService', () => {
8 let service: ScopeService;
9 let httpTesting: HttpTestingController;
12 providers: [ScopeService],
13 imports: [HttpClientTestingModule]
17 service = TestBed.inject(ScopeService);
18 httpTesting = TestBed.inject(HttpTestingController);
25 it('should be created', () => {
26 expect(service).toBeTruthy();
29 it('should call list', () => {
30 service.list().subscribe();
31 const req = httpTesting.expectOne('ui-api/scope');
32 expect(req.request.method).toBe('GET');