Testing Filters
I'm writing a function that dynamically adds filters to an Ash.Query for AshBackpex. I'm not sure how to assert that I'm getting the filters back that I want.
I can't figure out how to assert against this structure:
I can do this:
And I get:
But I don't know how to pattern match or make assertions against that.
I can also use
I can't figure out how to assert against this structure:
I can do this:
And I get:
contains(title, "foo bar")But I don't know how to pattern match or make assertions against that.
I can also use
Ash.Filter.to_simple_filter(...) and assert against the length filter.predicates , which might actually be enough for this use case. But I'd like to get more specific if possible.