2020-10-30 16:16:05 +01:00
|
|
|
import { TestBed } from '@angular/core/testing';
|
|
|
|
import { RouterTestingModule } from '@angular/router/testing';
|
2021-02-17 13:49:04 +01:00
|
|
|
import { AppComponent } from '@app/app.component';
|
|
|
|
import {TransactionService} from '@app/_services';
|
|
|
|
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent, TransactionServiceStub} from '@src/testing';
|
2020-10-30 16:16:05 +01:00
|
|
|
|
|
|
|
describe('AppComponent', () => {
|
|
|
|
beforeEach(async () => {
|
|
|
|
await TestBed.configureTestingModule({
|
|
|
|
imports: [
|
|
|
|
RouterTestingModule
|
|
|
|
],
|
|
|
|
declarations: [
|
2020-11-25 09:05:13 +01:00
|
|
|
AppComponent,
|
|
|
|
FooterStubComponent,
|
|
|
|
SidebarStubComponent,
|
|
|
|
TopbarStubComponent
|
2020-10-30 16:16:05 +01:00
|
|
|
],
|
2020-11-25 09:05:13 +01:00
|
|
|
providers: [
|
|
|
|
{ provide: TransactionService, useClass: TransactionServiceStub }
|
|
|
|
]
|
2020-10-30 16:16:05 +01:00
|
|
|
}).compileComponents();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should create the app', () => {
|
|
|
|
const fixture = TestBed.createComponent(AppComponent);
|
|
|
|
const app = fixture.componentInstance;
|
|
|
|
expect(app).toBeTruthy();
|
|
|
|
});
|
|
|
|
|
|
|
|
it(`should have as title 'cic-staff-client'`, () => {
|
|
|
|
const fixture = TestBed.createComponent(AppComponent);
|
|
|
|
const app = fixture.componentInstance;
|
|
|
|
expect(app.title).toEqual('cic-staff-client');
|
|
|
|
});
|
|
|
|
});
|