Commit b629907b authored by Maxime REYROLLE's avatar Maxime REYROLLE

fix dashboard component tests

parent c8a8f531
Pipeline #1305 passed with stage
in 14 minutes and 50 seconds
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import {ActivatedRoute} from '@angular/router';
import {Observable} from 'rxjs/Observable';
import { DashboardComponent } from './dashboard.component';
import {DashboardComponent} from './dashboard.component';
import {DashboardService} from '../shared/dashboard.service';
import {DashboardServiceMock} from '../shared/dashboard.service.mock';
describe('DashboardComponent', () => {
let component: DashboardComponent;
let fixture: ComponentFixture<DashboardComponent>;
const mock = {
params: Observable.of({local_government_id: 1})
};
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DashboardComponent ]
declarations: [
DashboardComponent
],
providers: [
{provide: DashboardService, useClass: DashboardServiceMock},
{provide: ActivatedRoute, useValue: mock}
]
})
.compileComponents();
.compileComponents();
}));
beforeEach(() => {
......
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