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

OZG-7473 rename method

Based on CR comment.
parent 8446229d
No related branches found
No related tags found
1 merge request!104Administration: Neu hinzugefügte Felder für Statistik speichern
......@@ -128,14 +128,14 @@ describe('AggregationMappingFormService', () => {
const stateResource: StateResource<AggregationMappingResource> = createStateResource(createAggregationMappingResource());
beforeEach(() => {
service.getByCurrentUrl.mockReturnValue(of(stateResource));
service.get.mockReturnValue(of(stateResource));
formService._patchForm = jest.fn();
});
it('should get by current url', () => {
formService.get();
expect(service.getByCurrentUrl).toHaveBeenCalled();
expect(service.get).toHaveBeenCalled();
});
it('should patch form', () => {
......
......@@ -58,7 +58,7 @@ export class AggregationMappingFormservice extends AbstractFormService<Aggregati
}
public get(): Observable<StateResource<AggregationMappingResource>> {
return this.aggregationMappingService.getByCurrentUrl().pipe(
return this.aggregationMappingService.get().pipe(
filter(isLoaded),
tap((stateResource: StateResource<AggregationMappingResource>) => this._patchForm(stateResource.resource)),
);
......
......@@ -95,20 +95,20 @@ describe('AggregationMappingService', () => {
});
});
describe('get by current url', () => {
describe('get', () => {
const stateResource = createStateResource(createAggregationMappingResource());
beforeEach(() => {
resourceService.get = jest.fn().mockReturnValue(of(stateResource));
});
it('should call resource service', () => {
service.getByCurrentUrl();
service.get();
expect(resourceService.get).toHaveBeenCalled();
});
it('should emit resource', () => {
expect(service.getByCurrentUrl()).toBeObservable(singleColdCompleted(stateResource));
expect(service.get()).toBeObservable(singleColdCompleted(stateResource));
});
});
......
......@@ -22,7 +22,7 @@ export class AggregationMappingService {
this.listService.refresh();
}
public getByCurrentUrl(): Observable<StateResource<AggregationMappingResource>> {
public get(): Observable<StateResource<AggregationMappingResource>> {
return this.resourceService.get();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment