summaryrefslogtreecommitdiffstats
path: root/public/src/app/api/rest-api.service.spec.ts
blob: ce921cb022924804277248eeeb2a2060db2c5867 (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
import { TestBed, inject } from '@angular/core/testing';
import { HttpModule } from '@angular/http';
import { RestApiService } from './rest-api.service';
import { v4 as genrateUuid } from 'uuid';

describe('RestApiService', () => {
  beforeEach(() => {
    TestBed.configureTestingModule({
      imports: [HttpModule],
      providers: [RestApiService]
    });
  });

  it(
    'should be created',
    inject([RestApiService], (service: RestApiService) => {
      expect(service).toBeTruthy();
    })
  );

  it('should genrate deffrent uuid each time for request id', () => {
    const firstUuid = genrateUuid();
    const secondUuid = genrateUuid();
    expect(firstUuid !== secondUuid).toBe(true);
  });
});