describe('PolicyService', () => {
let apiVersion2 = 'v2'
- let basePath = '';
+ let basePath = '/a1-policy/';
let policyService: PolicyService;
let httpTestingController: HttpTestingController;
beforeEach(() => TestBed.configureTestingModule({
let emptyPolicyType: PolicyTypes;
beforeEach(() => {
- policyService = TestBed.get(PolicyService);
- httpTestingController = TestBed.get(HttpTestingController);
+ policyService = TestBed.inject(PolicyService);
+ httpTestingController = TestBed.inject(HttpTestingController);
expectedPolicytypes = {
"policytype_ids": [
"",
policytypes => expect(policytypes).toEqual(expectedPolicytypes, 'should return expected PolicyTypes'),
fail
);
-
const req = httpTestingController.expectOne(basePath + apiVersion2 + '/' + policyService.policyTypesPath);
expect(req.request.method).toEqual('GET');
let emptyPolicyInstances: PolicyInstances;
let policyTypeId = '1';
beforeEach(() => {
- policyService = TestBed.get(PolicyService);
- httpTestingController = TestBed.get(HttpTestingController);
+ policyService = TestBed.inject(PolicyService);
+ httpTestingController = TestBed.inject(HttpTestingController);
expectedPolicyInstances = {
"policy_ids": [
"2100",
let emptyPolicyInstances: PolicyInstances;
let policyId = "2000";
beforeEach(() => {
- policyService = TestBed.get(PolicyService);
- httpTestingController = TestBed.get(HttpTestingController);
+ policyService = TestBed.inject(PolicyService);
+ httpTestingController = TestBed.inject(HttpTestingController);
expectedPolicyInstance = {
"policy_id": "2000",
"policytype_id": "1",