lib/devise/test_helpers.rb in devise-3.1.2 vs lib/devise/test_helpers.rb in devise-3.2.0
- old
+ new
@@ -106,9 +106,10 @@
env["PATH_INFO"] = "/#{options[:action]}"
env["warden.options"] = options
Warden::Manager._run_callbacks(:before_failure, env, options)
status, headers, response = Devise.warden_config[:failure_app].call(env).to_a
+ @controller.response.headers.merge!(headers)
@controller.send :render, :status => status, :text => response.body,
:content_type => headers["Content-Type"], :location => headers["Location"]
nil # causes process return @response
end