mirror of
https://github.com/heartcombo/devise.git
synced 2026-02-19 02:44:31 -05:00
Merge pull request #5600 from heartcombo/rm-drop-support-to-old-rubies-and-rails
Drop support to EOL rubies and Rails
This commit is contained in:
@@ -2,36 +2,8 @@
|
||||
|
||||
module Devise
|
||||
class IntegrationTest < ActionDispatch::IntegrationTest
|
||||
# %w( get post patch put head delete xml_http_request
|
||||
# xhr get_via_redirect post_via_redirect
|
||||
# ).each do |method|
|
||||
unless Devise::Test.rails5_and_up?
|
||||
%w( get post put ).each do |method|
|
||||
define_method(method) do |url, options = {}|
|
||||
if options[:xhr] == true
|
||||
xml_http_request __method__, url, options[:params] || {}, options[:headers]
|
||||
else
|
||||
super url, options[:params] || {}, options[:headers]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class ControllerTestCase < ActionController::TestCase
|
||||
# %w( get post patch put head delete xml_http_request
|
||||
# xhr get_via_redirect post_via_redirect
|
||||
# ).each do |method|
|
||||
unless Devise::Test.rails5_and_up?
|
||||
%w( get post put ).each do |method|
|
||||
define_method(method) do |action, options = {}|
|
||||
if options[:xhr] == true
|
||||
xml_http_request __method__, action, options[:params] || {}, options[:headers]
|
||||
else
|
||||
super action, options[:params] || {}, options[:headers]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user