ruby - Cant set custom header params with rspec and Grape -
i utilize grape api , need write test custom header
my code:
"should take message" post "/api/v1/my/route", post_data, secret: "asdfghjkl" last_response.status.should == 201 end
but route gets no headers @ all, tried headers['secret'] = "asdfghjkl"
, request.env['secret']
nil works.
how can pass headers in rspec grape route?
did seek header 'secret', 'asdfghjkl'
?
more on rack-test docs
ruby rspec grape-api
No comments:
Post a Comment