diff --git a/tests/generic/incremental_accepted_values.sql b/tests/generic/incremental_accepted_values.sql index c356f1c..702350d 100644 --- a/tests/generic/incremental_accepted_values.sql +++ b/tests/generic/incremental_accepted_values.sql @@ -1,15 +1,14 @@ -{% test incremental_accepted_values(model, column_name, date_column_name, greater_than_equal_to, less_than_equal_to, condition, values=[], quote=false) %} +{% test incremental_accepted_values(model, column_name, date_column_name, greater_than_equal_to, less_than_equal_to, condition, quote, values=[]) %} {{ config(severity = 'error') }} {% set condition = condition | default('') %} {% set date_column_name = date_column_name | default('closed_at') %} {% set greater_than_equal_to = greater_than_equal_to | default('2 day') %} {% set less_than_equal_to = less_than_equal_to | default('') %} - {% if quote %} - {% set values = values | map(attribute='string') | join(', ') %} - {% else %} - {% set values = values | join(', ') %} - {% endif %} + {% set quote = quote | default(false) %} + {% set values = + (values | map('string') | map('trim') | join("', '") | prepend("'") | append("'") if quote else values | join(', ')) + %} with all_values as (