Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 1 | import { TestBed, inject } from '@angular/core/testing'; |
| 2 | import { HttpModule } from '@angular/http'; |
| 3 | import { RestApiService } from './rest-api.service'; |
| 4 | import { v4 as genrateUuid } from 'uuid'; |
| 5 | |
| 6 | describe('RestApiService', () => { |
| 7 | beforeEach(() => { |
| 8 | TestBed.configureTestingModule({ |
| 9 | imports: [HttpModule], |
| 10 | providers: [RestApiService] |
| 11 | }); |
| 12 | }); |
| 13 | |
| 14 | it( |
| 15 | 'should be created', |
| 16 | inject([RestApiService], (service: RestApiService) => { |
| 17 | expect(service).toBeTruthy(); |
| 18 | }) |
| 19 | ); |
| 20 | |
| 21 | it('should genrate deffrent uuid each time for request id', () => { |
| 22 | const firstUuid = genrateUuid(); |
| 23 | const secondUuid = genrateUuid(); |
| 24 | expect(firstUuid !== secondUuid).toBe(true); |
| 25 | }); |
| 26 | }); |