Properly submittingarray of data for a minitest
10:33 19 Nov 2025

The following params are submitted in different actions the following manner
?acc_ids%5B%5D=246&acc_ids%5B%5D=247&acc_ids%5B%5D=248 with Parameters: {"acc_ids"=>["246", "247", "248"]} for action_one
?client_id=169&acc_ids=246+247+248 with Parameters: {"client_id"=>"169", "acc_ids"=>"246 247 248" for action_two
Rails runs its bit of magic, but the obfuscation of data types is making this array of values complex to handle and therefore creating uncertainty in the reliability of the test.

considering fixtures account_246 account_247 account_248 and the actions tested

get action_one_checkouts_url, params: { acc_ids: [ accounts(:account_246).id.to_s, accounts(:account_247).id.to_s, accounts(:account_248).id.to_s ], client_id: clients(:... }
get action_two_checkouts_url, params: { ??? ...}

to extract the ids for subsequent use
action_one is cast correctly, as processing then runs params[:acc_ids].map(&:to_i)
but the latter must run params[:acc_ids].split(' ').map(&:to_i)

How should the call to action_two have its parameters cast?

ruby-on-rails minitest