1 import { TestBed, async } from '@angular/core/testing';
2 import { APP_BASE_HREF } from '@angular/common';
3 import { RouterModule, Routes } from '@angular/router';
4 import { AppComponent } from './app.component';
6 describe('AppComponent', () => {
7 const routes: Routes = [
8 { path: '', redirectTo: '/policy', pathMatch: 'full'}
10 beforeEach(async(() => {
11 TestBed.configureTestingModule({
16 RouterModule.forRoot(routes)
19 { provide: APP_BASE_HREF, useValue: '/' }
21 }).compileComponents();
24 it('should create the app', async(() => {
25 const fixture = TestBed.createComponent(AppComponent);
26 const app = fixture.debugElement.componentInstance;
27 expect(app).toBeTruthy();
30 it(`should have as title 'controlpanelApp'`, async(() => {
31 const fixture = TestBed.createComponent(AppComponent);
32 const app = fixture.debugElement.componentInstance;
33 expect(app.title).toEqual('controlpanelApp');