How can you input multiple values for the one field into a开发者_运维知识库 Ruby functional test, much like a multiselect box? Code below that I thought would work, doesn't.
post :create, :post => { :multiselect1 => ['value1', 'value2'] , :multiselect2 => ['value3', 'value4'] }
unless you were really trying to post "post[multiselect1][]"
and "post[multiselect2][]"
you should try this:
post :create, {:multiselect1 => ['value1', 'value2'] , :multiselect2 => ['value3', 'value4'] }
this will submit "multiselect1[]"
and "multiselect2[]"
let me know if my assumption was wrong
cheers!
精彩评论