1c96f7ed8fe2eb4d03e9c8b46e5ce019a3562c3d
[portal/sdk.git] /
1 import { TestBed } from '@angular/core/testing';
2
3 import { DashboardReportService } from './dashboard-report.service';
4 import { HttpClientTestingModule } from '@angular/common/http/testing';
5 import { HttpClient } from '@angular/common/http';
6 import { environment } from 'src/environments/environment';
7
8 describe('DashboardReportService', () => {
9
10     let service: DashboardReportService;
11
12   beforeEach(() => {TestBed.configureTestingModule({
13     imports: [HttpClientTestingModule],
14     providers: [HttpClient, HttpClientTestingModule, DashboardReportService]
15   });
16     service = TestBed.get(DashboardReportService);
17   
18 });
19
20   it('should be created', () => {
21     const service: DashboardReportService = TestBed.get(DashboardReportService);
22     expect(service).toBeTruthy();
23   });
24
25   it('should getReportData', () => {
26       service.getReportData("test").subscribe((res) => {
27           expect(res).toBe(environment);
28       });
29   });
30
31   it('should getReportDataWithFormFields', () => {
32     service.getReportDataWithFormFields("just", "test").subscribe((res) => {
33         expect(res).toBe(environment);
34     });
35   });
36
37 });