Request format in functional tests
How do I set the request format in a functional test?
I'm trying to do something like:
开发者_C百科get :show, :id => '1', :format => :xml
but that doesn't work.
For some reason you can't use symbols to define the format in tests, you must use the string version.
get :show, :id => '1', :format => 'xml'
精彩评论