Summary Table
Categories |
Total Count |
PII |
0 |
URL |
0 |
DNS |
0 |
EKL |
0 |
IP |
0 |
PORT |
0 |
VsID |
0 |
CF |
0 |
AI |
0 |
VPD |
0 |
PL |
0 |
Other |
0 |
File Content
import { ActiveStationsComponent } from './active-stations.component';
import { HomeService } from './../../fpps/home/home.service';
import { Observable } from 'rxjs/Observable';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
describe('ActiveStationsComponent', () => {
let homeService:HomeService;
let component:ActiveStationsComponent;
beforeEach(() => {
homeService = new HomeService(null, null);
component = new ActiveStationsComponent(homeService);
});
it('should be created', () => {
expect(component).toBeTruthy();
});
it('test ngOnInit method', () => {
let returnedActiveStations = [ 'ACTIVE_STATION_1', 'ACTIVE_STATION_2', 'ACTIVE_STATION_3' ];
homeService.selectedStationNotifier$ = new BehaviorSubject(returnedActiveStations);
expect(component.activeStations).toEqual(undefined);
component.ngOnInit();
expect(component.activeStations).toEqual(returnedActiveStations);
});
});