Skip to content

Commit

Permalink
Remove unnecessary condition
Browse files Browse the repository at this point in the history
Signed-off-by: Yuta Iwama <[email protected]>
  • Loading branch information
ganmacs committed Feb 25, 2020
1 parent a0ce293 commit c7bd706
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions test/plugin_helper/test_http_server_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,20 +161,12 @@ def start_https_request(addr, port, verify: true, cert_path: nil, selfsigned: tr
assert_equal(nil, resp.body)
assert_equal('text/plain', resp['Content-Type'])

%w[get put post put delete trace].each do |n|
%w[get put post put delete options trace].each do |n|
resp = send(n, "http://127.0.0.1:#{PORT}/example/hello")
assert_equal('200', resp.code)
assert_equal("hello #{n}", resp.body)
assert_equal('text/plain', resp['Content-Type'])
end

# TODO: remove when fluentd drop ruby 2.1
if Gem::Version.create(RUBY_VERSION) >= Gem::Version.create('2.2.0')
resp = options("http://127.0.0.1:#{PORT}/example/hello")
assert_equal('200', resp.code)
assert_equal("hello options", resp.body)
assert_equal('text/plain', resp['Content-Type'])
end
end
end

Expand Down

0 comments on commit c7bd706

Please sign in to comment.