OpenSlides/client/src/app/app.component.spec.ts
2019-02-01 10:19:17 +01:00

24 lines
863 B
TypeScript

import { TestBed, async } from '@angular/core/testing';
import { AppComponent } from './app.component';
import { E2EImportsModule } from './../e2e-imports.module';
import { ServertimeService } from './core/core-services/servertime.service';
describe('AppComponent', () => {
let servertimeService;
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [E2EImportsModule]
}).compileComponents();
servertimeService = TestBed.get(ServertimeService);
spyOn(servertimeService, 'startScheduler').and.stub();
}));
it('should create the app', async(() => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
expect(servertimeService.startScheduler).toHaveBeenCalled();
}));
});