assert with each instead of map