1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Minor performance

This commit is contained in:
Thomas Walpole 2020-10-10 15:19:16 -07:00
parent 34da71e573
commit e0eb940f71

View file

@ -32,7 +32,7 @@ class Capybara::RackTest::Browser
def submit(method, path, attributes)
path = request_path if path.nil? || path.empty?
uri = build_uri(path)
uri.query = '' if method.to_s.downcase == 'get'
uri.query = '' if method.to_s.casecmp('get').zero?
process_and_follow_redirects(method, uri.to_s, attributes, 'HTTP_REFERER' => current_url)
end