commit | d3c8be5996ca613cdaf8762bd702fd557de139e7 | [log] [tgz] |
---|---|---|
author | Peter Buschmann <peter.buschmann@pta.de> | Thu Jun 18 13:50:28 2020 +0200 |
committer | Peter Buschmann <peter.buschmann@pta.de> | Thu Jun 18 13:50:28 2020 +0200 |
tree | f6fba98b6426f1d49843c24603bb406c9d4c96d6 | |
parent | 9d7467430ec81356233f74309e7d51e471274520 [diff] |
[SI-1447] unit test added Signed-off-by: Peter Buschmann <peter.buschmann@pta.de>
diff --git a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-details/grid-failure-details.sandbox.spec.ts b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-details/grid-failure-details.sandbox.spec.ts index 09dac39..1e354b8 100644 --- a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-details/grid-failure-details.sandbox.spec.ts +++ b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-details/grid-failure-details.sandbox.spec.ts
@@ -57,6 +57,13 @@ expect(service).toBeTruthy(); }); + it('should loadStations via init()', () => { + const spy = spyOn(service as any, 'loadGridFailureStations'); + service.gridFailureStations$ = of([new FailureStation()]); + service.init(); + expect(spy).toHaveBeenCalled(); + }); + it('should dispatch loadGridFailure Action via loadGridFailure(id)', () => { service.loadGridFailure('id'); expect(appState.dispatch).toHaveBeenCalledWith(gridFailureActions.loadGridFailureDetail({ payload: 'id' }));