Closed schristley closed 4 years ago
the original test was passing a number but because the field is a string in the schema, so the value is transformed into a string for the query, thus why the test passed.
{
"filters": {
"op":"contains",
"content": {
"field":"sample.cell_phenotype",
"value":45
}
}
}
To actually test that contains is restricted to string, we should change the test to a field that is a number or other non-string.
Updated reference implementation so that it throws query error for contains
on a non-string. Also added a couple of tests to check.
contains
should only work for string.