I need to test if client includes POINTS array in post-request. When I test it with RESTClient plugin for firefox, I do it like this:
POINTS[]=1.111111,2.222222,77
and it works. Now I need to test it via rspec, but I can't figure out how to do it. Here is my rspec test request:
post :event, DISTANCE: "12345", POINTS: { "1" => "1.111111,2.222222,77" }
But somehow it does not work. puts p.inspect shows: ["1", "1.111111,2.222222,77"] and it's not what I want.
Thanks.
As already told in comments, do:
post :event, distance: "12345", points: ["1.111111,2.222222,77"]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With