summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql.service.spec.ts
blob: 68978d908d4dfff2b84fff4c968ada6c699d503d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { TestBed } from '@angular/core/testing';

import { SqlService } from './sql.service';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { HttpClient } from '@angular/common/http';
import { environment } from 'src/environments/environment';

describe('SqlService', () => {

  let service: SqlService;

  beforeEach(() => {TestBed.configureTestingModule({
    imports: [HttpClientTestingModule],
    providers: [SqlService, HttpClient, HttpClientTestingModule]
  })
    service = TestBed.get(SqlService);
});

  it('should be created', () => {
    const service: SqlService = TestBed.get(SqlService);
    expect(service).toBeTruthy();
  });

  it('should getSQLTabData', () => {
      service.getSQLTabData("test").subscribe((res) => {
          expect(res).toBe(environment);
      });
  });

  it('should postSQLValidateAndSave', () => {
        service.postSQLValidateAndSave("test").subscribe((res) => {
            expect(res).toBe(environment)
        });
  });


});