2020-08-10 16:15:17 +02:00
|
|
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
|
|
|
|
|
|
import { ChangelogComponent } from './changelog.component';
|
2020-08-16 20:01:56 +02:00
|
|
|
import {ApiService} from '../services/api.service';
|
|
|
|
import {ModalService, RbUiComponentsModule} from '@inst-iot/bosch-angular-ui-components';
|
|
|
|
import {FormsModule} from '@angular/forms';
|
|
|
|
import {ValidationService} from '../services/validation.service';
|
|
|
|
import {DataService} from '../services/data.service';
|
|
|
|
|
|
|
|
// TODO
|
|
|
|
|
|
|
|
let apiServiceSpy: jasmine.SpyObj<ApiService>;
|
|
|
|
let modalServiceSpy: jasmine.SpyObj<ModalService>;
|
2020-08-10 16:15:17 +02:00
|
|
|
|
|
|
|
describe('ChangelogComponent', () => {
|
|
|
|
let component: ChangelogComponent;
|
|
|
|
let fixture: ComponentFixture<ChangelogComponent>;
|
|
|
|
|
|
|
|
beforeEach(async(() => {
|
2020-08-16 20:01:56 +02:00
|
|
|
const apiSpy = jasmine.createSpyObj('ApiService', ['get']);
|
|
|
|
const modalSpy = jasmine.createSpyObj('ModalService', ['open']);
|
|
|
|
|
2020-08-10 16:15:17 +02:00
|
|
|
TestBed.configureTestingModule({
|
2020-08-16 20:01:56 +02:00
|
|
|
declarations: [ ChangelogComponent ],
|
|
|
|
imports: [
|
|
|
|
],
|
|
|
|
providers: [
|
|
|
|
{provide: ApiService, useValue: apiSpy},
|
|
|
|
{provide: ModalService, useValue: modalSpy}
|
|
|
|
]
|
2020-08-10 16:15:17 +02:00
|
|
|
})
|
|
|
|
.compileComponents();
|
2020-08-16 20:01:56 +02:00
|
|
|
|
|
|
|
apiServiceSpy = TestBed.inject(ApiService) as jasmine.SpyObj<ApiService>;
|
|
|
|
modalServiceSpy = TestBed.inject(ModalService) as jasmine.SpyObj<ModalService>;
|
2020-08-10 16:15:17 +02:00
|
|
|
}));
|
|
|
|
|
|
|
|
beforeEach(() => {
|
|
|
|
fixture = TestBed.createComponent(ChangelogComponent);
|
|
|
|
component = fixture.componentInstance;
|
2020-08-16 20:01:56 +02:00
|
|
|
component.ngOnInit();
|
2020-08-10 16:15:17 +02:00
|
|
|
fixture.detectChanges();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should create', () => {
|
|
|
|
expect(component).toBeTruthy();
|
|
|
|
});
|
|
|
|
});
|