How to emulate a HTML multiselect of inputs in Ruby tests -


how can input multiple values 1 field ruby functional test, multiselect box? code below thought work, doesn't.

post :create, :post => { :multiselect1 => ['value1', 'value2'] , :multiselect2 => ['value3', 'value4'] } 

unless trying post "post[multiselect1][]" , "post[multiselect2][]" should try this:

post :create, {:multiselect1 => ['value1', 'value2'] , :multiselect2 => ['value3', 'value4'] } 

this submit "multiselect1[]" , "multiselect2[]"

let me know if assumption wrong

cheers!


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -