Commits

Alexandre Vryghem authored 28088bc8c85
111731: Made the code completely dependent on the SearchService#appliedFilters$ instead of relying on the route query parameters
No tags

src/app/core/shared/search/search-filter.service.spec.ts

Modified
146 146 beforeEach(() => {
147 147 spyOn(routeServiceStub, 'hasQueryParam');
148 148 service.isFilterActive(mockFilterConfig.paramName);
149 149 });
150 150
151 151 it('should call hasQueryParam on the route service with the same parameters', () => {
152 152 expect(routeServiceStub.hasQueryParam).toHaveBeenCalledWith(mockFilterConfig.paramName);
153 153 });
154 154 });
155 155
156 - describe('when the getSelectedValuesForFilter method is called', () => {
157 - beforeEach(() => {
158 - spyOn(routeServiceStub, 'getQueryParameterValues');
159 - service.getSelectedValuesForFilter(mockFilterConfig);
160 - });
161 -
162 - it('should call getQueryParameterValues on the route service with the same parameters', () => {
163 - expect(routeServiceStub.getQueryParameterValues).toHaveBeenCalledWith(mockFilterConfig.paramName);
164 - });
165 - });
166 -
167 156 describe('when the getCurrentScope method is called', () => {
168 157 beforeEach(() => {
169 158 spyOn(routeServiceStub, 'getQueryParameterValue');
170 159 service.getCurrentScope();
171 160 });
172 161
173 162 it('should call getQueryParameterValue on the route service with scope', () => {
174 163 expect(routeServiceStub.getQueryParameterValue).toHaveBeenCalledWith('scope');
175 164 });
176 165 });

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut