Function Test Request Form

How to set the request format in a functional test?

I am trying to do something like:

get :show, :id => '1', :format => :xml

but that will not work.

+4
source share
1 answer

For some reason, you cannot use characters to determine the format in tests, you must use the string version.

 get :show, :id => '1', :format => 'xml' 
+6
source

Source: https://habr.com/ru/post/1346615/


All Articles