Commit 9e5ea001 authored by Maxime REYROLLE's avatar Maxime REYROLLE

fix dashboard service tests

parent 77277cdb
import { TestBed, inject } from '@angular/core/testing';
import { DashboardService } from './dashboard.service';
import {Http, BaseRequestOptions} from '@angular/http';
import {MockBackend} from '@angular/http/testing';
import {AuthHttp} from 'angular2-jwt';
describe('DashboardService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [DashboardService]
providers: [
DashboardService,
{
provide: Http,
useFactory: (mockBackend: MockBackend, requestOptions: BaseRequestOptions) => {
return new Http(mockBackend, requestOptions);
},
deps: [MockBackend, BaseRequestOptions]
},
MockBackend,
BaseRequestOptions,
{provide: AuthHttp, useExisting: Http, deps: [Http]},
]
});
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment