diff options
author | Rupinder <rupinsi1@in.ibm.com> | 2020-03-02 14:23:06 +0530 |
---|---|---|
committer | Rupinder <rupinsi1@in.ibm.com> | 2020-03-02 14:23:17 +0530 |
commit | c65c0c97e41c54ec0560261109d4330dde34c49f (patch) | |
tree | 503932a43c65712835cd061a8ad9560db9a4c1bf /ecomp-sdk/epsdk-app-overlay | |
parent | da263e557b4d104cc0a0496daf31cc3437560421 (diff) |
wrote test case for dashboard-report-grid service class
Wrote test case for dashboard-report-grid.service.spec.ts
Issue-ID: PORTAL-834
Change-Id: I5f16c0c5f20fca3fe8c5eda9a7bbd65220c1476a
Signed-off-by: Rupinder<rupinsi1@in.ibm.com>
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay')
-rw-r--r-- | ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/dashboard-report-grid/dashboard-report-grid.service.spec.ts | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/dashboard-report-grid/dashboard-report-grid.service.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/dashboard-report-grid/dashboard-report-grid.service.spec.ts index 72d0980d..f8611463 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/dashboard-report-grid/dashboard-report-grid.service.spec.ts +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/dashboard-report-grid/dashboard-report-grid.service.spec.ts @@ -1,12 +1,28 @@ import { TestBed } from '@angular/core/testing'; import { DashboardReportGridService } from './dashboard-report-grid.service'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { environment } from 'src/environments/environment'; describe('DashboardReportGridService', () => { - beforeEach(() => TestBed.configureTestingModule({})); + + let service: DashboardReportGridService; + + beforeEach(() => {TestBed.configureTestingModule({ + imports: [HttpClientTestingModule] + }); + service = TestBed.get(DashboardReportGridService); + +}); it('should be created', () => { const service: DashboardReportGridService = TestBed.get(DashboardReportGridService); expect(service).toBeTruthy(); }); + + it('should getReportList', () => { + service.getReportList().subscribe((res) => { + expect(res).toBe(environment); + }) + }) }); |