Skip to content
Snippets Groups Projects
Verified Commit 81af1208 authored by Sebastian Bergandy's avatar Sebastian Bergandy :keyboard:
Browse files

OZG-7473 improve code

Based on CR comment.
parent a57b75b8
Branches
Tags
1 merge request!104Administration: Neu hinzugefügte Felder für Statistik speichern
...@@ -49,12 +49,13 @@ describe('AggregationMappingListComponent', () => { ...@@ -49,12 +49,13 @@ describe('AggregationMappingListComponent', () => {
}); });
it('should have spinner with state resource', () => { it('should have spinner with state resource', () => {
const comp = getElementFromFixtureByType(fixture, SpinnerComponent); const comp: SpinnerComponent = getElementFromFixtureByType(fixture, SpinnerComponent);
expect(comp.stateResource).toEqual(aggregationMappingListStateResource); expect(comp.stateResource).toEqual(aggregationMappingListStateResource);
}); });
it('should have list item with mapping', () => { it('should have list item with mapping', () => {
const comp = getElementFromFixtureByType(fixture, AggregationMappingListItemComponent); const comp: AggregationMappingListItemComponent = getElementFromFixtureByType(fixture, AggregationMappingListItemComponent);
expect(comp.aggregationMapping).toEqual( expect(comp.aggregationMapping).toEqual(
getEmbeddedResources(aggregationMappingListStateResource, AggregationMappingListLinkRel.LIST)[0], getEmbeddedResources(aggregationMappingListStateResource, AggregationMappingListLinkRel.LIST)[0],
); );
......
...@@ -97,6 +97,7 @@ describe('AggregationMappingService', () => { ...@@ -97,6 +97,7 @@ describe('AggregationMappingService', () => {
describe('get', () => { describe('get', () => {
const stateResource: StateResource<AggregationMappingResource> = createStateResource(createAggregationMappingResource()); const stateResource: StateResource<AggregationMappingResource> = createStateResource(createAggregationMappingResource());
beforeEach(() => { beforeEach(() => {
resourceService.get = jest.fn().mockReturnValue(of(stateResource)); resourceService.get = jest.fn().mockReturnValue(of(stateResource));
}); });
...@@ -108,9 +109,9 @@ describe('AggregationMappingService', () => { ...@@ -108,9 +109,9 @@ describe('AggregationMappingService', () => {
}); });
it('should emit resource', () => { it('should emit resource', () => {
const got$: Observable<StateResource<AggregationMappingResource>> = service.get(); const stateResource$: Observable<StateResource<AggregationMappingResource>> = service.get();
expect(got$).toBeObservable(singleColdCompleted(stateResource)); expect(stateResource$).toBeObservable(singleColdCompleted(stateResource));
}); });
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment