Building a dynamic query using ecto's `dynamic` macro

You shouldn’t be testing queries based on their internals. They might change at any time. Also e.g. reordering your conditions would break your tests even though the query would be functionally equal to before. You don’t want brittle tests like that.