Skip to content

Commit 6a4ff5c

Browse files
committed
Revert "Add the options method to action_controller testcase."
This reverts commit 0303c23. Conflicts: actionpack/lib/action_controller/test_case.rb REASON: It will conflict with a lot of test cases. Better to call `process` directly since this is a very uncommon HTTP method. Fixes #10638.
1 parent 89f558c commit 6a4ff5c

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

actionpack/lib/action_controller/test_case.rb

-6
Original file line numberDiff line numberDiff line change
@@ -499,12 +499,6 @@ def head(action, *args)
499499
process(action, "HEAD", *args)
500500
end
501501

502-
# Simulate a OPTIONS request with the given parameters and set/volley the response.
503-
# See +get+ for more details.
504-
def options(action, *args)
505-
process(action, "OPTIONS", *args)
506-
end
507-
508502
def xml_http_request(request_method, action, parameters = nil, session = nil, flash = nil)
509503
@request.env['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest'
510504
@request.env['HTTP_ACCEPT'] ||= [Mime::JS, Mime::HTML, Mime::XML, 'text/xml', Mime::ALL].join(', ')

actionpack/test/controller/test_case_test.rb

-5
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,6 @@ def test_head_params_as_sting
201201
assert_raise(NoMethodError) { head :test_params, "document body", :id => 10 }
202202
end
203203

204-
def test_options
205-
options :test_params
206-
assert_equal 200, @response.status
207-
end
208-
209204
def test_process_without_flash
210205
process :set_flash
211206
assert_equal '><', flash['test']

0 commit comments

Comments
 (0)