2018-06-13 18:34:10 +02:00
|
|
|
import { TestBed, async } from '@angular/core/testing';
|
|
|
|
import { AppComponent } from './app.component';
|
2018-09-02 11:05:09 +02:00
|
|
|
import { E2EImportsModule } from './../e2e-imports.module';
|
2019-01-31 13:40:27 +01:00
|
|
|
import { ServertimeService } from './core/core-services/servertime.service';
|
2019-01-24 16:25:50 +01:00
|
|
|
|
2018-06-13 18:34:10 +02:00
|
|
|
describe('AppComponent', () => {
|
2019-01-24 16:25:50 +01:00
|
|
|
let servertimeService;
|
|
|
|
|
2018-06-19 16:55:50 +02:00
|
|
|
beforeEach(async(() => {
|
|
|
|
TestBed.configureTestingModule({
|
2018-09-02 11:05:09 +02:00
|
|
|
imports: [E2EImportsModule]
|
2018-06-19 16:55:50 +02:00
|
|
|
}).compileComponents();
|
2019-01-24 16:25:50 +01:00
|
|
|
|
|
|
|
servertimeService = TestBed.get(ServertimeService);
|
|
|
|
spyOn(servertimeService, 'startScheduler').and.stub();
|
2018-06-19 16:55:50 +02:00
|
|
|
}));
|
|
|
|
it('should create the app', async(() => {
|
|
|
|
const fixture = TestBed.createComponent(AppComponent);
|
|
|
|
const app = fixture.debugElement.componentInstance;
|
|
|
|
expect(app).toBeTruthy();
|
2019-01-24 16:25:50 +01:00
|
|
|
expect(servertimeService.startScheduler).toHaveBeenCalled();
|
2018-06-19 16:55:50 +02:00
|
|
|
}));
|
2018-06-13 18:34:10 +02:00
|
|
|
});
|