From eb52cb183bb31a8bf40a651a5b8f5a398975d71b Mon Sep 17 00:00:00 2001 From: Aaron Louie Date: Wed, 13 Nov 2019 13:40:48 -0500 Subject: [PATCH] Adds dummy API URL test --- src/app/_services/api/api.service.spec.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/app/_services/api/api.service.spec.ts b/src/app/_services/api/api.service.spec.ts index 0423f55..157fad8 100644 --- a/src/app/_services/api/api.service.spec.ts +++ b/src/app/_services/api/api.service.spec.ts @@ -26,4 +26,15 @@ describe('ApiService', () => { const service: ApiService = TestBed.get(ApiService); expect(service).toBeTruthy(); }); + + it('should rewrite dummy API URL to access static JSON assets directory', () => { + const service: ApiService = TestBed.get(ApiService); + const result: string = (service as any)._dummy_api_url('https://staging.whatever.com:5000/api/whatever'); + expect(result).toEqual('/assets/json/whatever.json'); + }); + + it('should rewrite dummy API URL to access static JSON assets directory', () => { + const service: ApiService = TestBed.get(ApiService); + + }); });