gns3-web-ui/src/app/app.component.spec.ts

31 lines
910 B
TypeScript
Raw Normal View History

2017-09-25 11:07:52 +00:00
import { TestBed, async } from '@angular/core/testing';
2017-10-19 10:16:59 +00:00
import { RouterTestingModule } from '@angular/router/testing';
2017-09-25 11:07:52 +00:00
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
2017-10-19 10:16:59 +00:00
declarations: [
AppComponent
],
imports: [
RouterTestingModule
]
2017-09-25 11:07:52 +00:00
}).compileComponents();
}));
it('should create the app', async(() => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
}));
2017-10-19 10:16:59 +00:00
it('should have footer', async(() => {
2017-09-25 11:07:52 +00:00
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;
2017-10-19 10:16:59 +00:00
expect(compiled.querySelector('.text-muted').textContent).toContain('GNS3 Web UI demo');
2017-09-25 11:07:52 +00:00
}));
});