更新时间:2021-11-25 08:17:15
很多挫折和变化,这对我有用.Rails 3.2.12 Rspec 2.10
A lot of frustration and variations and that's what worked for me. Rails 3.2.12 Rspec 2.10
@request.env["HTTP_ACCEPT"] = "application/json"
@request.env["CONTENT_TYPE"] = "application/json"
put :update, :id => 1, "email" => "bing@test.com"
wrap_parameters 似乎以这种方式声明
wrap_parameters seems to be working declared this way
wrap_parameters User, format: :json
用于User
模型