batch::submit_from_csv parses its CSV rows inline, inside the
function. batch::v2::parse_recipients does the same work in a named
function, and only the V2 copy has tests.
So the CSV format rule is written twice, and the tests point at one
copy. A change to the format will edit v2::parse_recipients, because
that is what the tests name, and V1 will keep the old behaviour
silently.
Extract the V1 loop into parse_recipients beside its V2 twin, and
give it the same three tests: a good file, an unparsable amount, and an
empty file.
batch::submit_from_csvparses its CSV rows inline, inside thefunction.
batch::v2::parse_recipientsdoes the same work in a namedfunction, and only the V2 copy has tests.
So the CSV format rule is written twice, and the tests point at one
copy. A change to the format will edit
v2::parse_recipients, becausethat is what the tests name, and V1 will keep the old behaviour
silently.
Extract the V1 loop into
parse_recipientsbeside its V2 twin, andgive it the same three tests: a good file, an unparsable amount, and an
empty file.