Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
fix(mock): Added MockHttp to board module's provider list
Browse files Browse the repository at this point in the history
  • Loading branch information
sanbornsen authored and michaelkleinhenz committed Mar 16, 2017
1 parent f44281b commit 37c7d5f
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions src/app/work-item/work-item-board/planner-board.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,30 @@ import { WorkItemDetailModule } from '../work-item-detail/work-item-detail.modul
import { WorkItemQuickAddModule } from '../work-item-quick-add/work-item-quick-add.module';
import { WorkItemService } from '../work-item.service';

import { MockHttp } from './../../shared/mock-http';

let providers = [];

if (process.env.ENV == 'inmemory') {
providers = [
AuthUserResolve,
GlobalSettings,
UsersResolve,
WorkItemService,
{
provide: Http,
useClass: MockHttp
}
];
} else {
providers = [
AuthUserResolve,
GlobalSettings,
UsersResolve,
WorkItemService
];
}


@NgModule({
imports: [
Expand All @@ -53,12 +77,7 @@ import { WorkItemService } from '../work-item.service';
AlmFilterBoardList,
WorkItemBoardComponent,
],
providers: [
AuthUserResolve,
GlobalSettings,
UsersResolve,
WorkItemService
],
providers: providers,
exports: [ WorkItemBoardComponent ]
})
export class PlannerBoardModule {
Expand Down

0 comments on commit 37c7d5f

Please sign in to comment.