mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Avoid hard-coded value in test setup/teardown.
This commit is contained in:
parent
da19e0d132
commit
d9be7ad7cf
1 changed files with 2 additions and 1 deletions
|
@ -805,6 +805,7 @@ class RequestFormat < BaseRequestTest
|
||||||
end
|
end
|
||||||
|
|
||||||
test "ignore_accept_header" do
|
test "ignore_accept_header" do
|
||||||
|
old_ignore_accept_header = ActionDispatch::Request.ignore_accept_header
|
||||||
ActionDispatch::Request.ignore_accept_header = true
|
ActionDispatch::Request.ignore_accept_header = true
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
@ -834,7 +835,7 @@ class RequestFormat < BaseRequestTest
|
||||||
request.expects(:parameters).at_least_once.returns({:format => :json})
|
request.expects(:parameters).at_least_once.returns({:format => :json})
|
||||||
assert_equal [ Mime::JSON ], request.formats
|
assert_equal [ Mime::JSON ], request.formats
|
||||||
ensure
|
ensure
|
||||||
ActionDispatch::Request.ignore_accept_header = false
|
ActionDispatch::Request.ignore_accept_header = old_ignore_accept_header
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue