I make couple of test which checks my API Services. In one test i pass two parameters to api/v1/pages/1 and it works OK; Here’s code
put “api/v1/pages/#{@page.id}”, { “title” => “new title”,
“description” => “new description”} last_response.status.should eql(200)
Now i’m having problems with passing array of objects to service. I was trying something but unsuccessfully.
@index = build(:index) //factory girl
@contact = build(:contact)
put "api/v1/pages/1/menu" ,[ //need to pass @index and @contact, and/or @index.name, @contact.name]
Try
Rails should marshal your objects on both sides.