CartoDB / Windshaft-cartodb

Windshaft tailored for CARTO
BSD 3-Clause "New" or "Revised" License
72 stars 59 forks source link

Validate aggregation method is either sum or count #1139

Closed esloho closed 5 years ago

esloho commented 5 years ago

Fixes #1137

The method checkOptions in models/dataview/aggregation already validates that the necessary options are included and that the aggregation methods exist. However, the overview use case has a more restricted list of valid methods (it only accepts sum or count) and thus the existing validation wasn't enough in here.

Extra validation has been added for the overview together with some tests to validate that all cases are covered by one of the validation methods.