otuv
What is the standard way to test a map structure
Hi,
I’m trying to make an assertion that an item has recieved yet another timestamp in a list. My current solution is to do a regular match which will fail the test if not working. I obviously find out if my test does not work but it feels rather hacky and not a proper solution.
What I would like to do is something similar to:
assert [{id, [_t1, _t2]}] == updated_thing.list_with_timestamps
But that only works if I specify the _t1 and _t2 which obviously does not work with timestamps…
What is the standard way to test this?
Most Liked
zoedsoupe
This timestamp is what? A NaiveDateTime? A DateTime? A Date? A String? And you’re asserting strict equality, not only matching! Please, give a example structure
ityonemo
assert [<<_::binary>>,<<_:: binary>>] = value
If you know the results but order is nondeterministic, Enum.sort both sides.







