From dd84195db631ecad924ae7c00f7a869c78ccf6bc Mon Sep 17 00:00:00 2001 From: HoneyryderChuck Date: Tue, 26 Sep 2023 17:36:18 +0100 Subject: [PATCH] bump coverage by testing more edge cases mime type detector using file, no idnx --- standalone_tests/no_punycode_test.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 standalone_tests/no_punycode_test.rb diff --git a/standalone_tests/no_punycode_test.rb b/standalone_tests/no_punycode_test.rb new file mode 100644 index 00000000..31763c7d --- /dev/null +++ b/standalone_tests/no_punycode_test.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +$LOAD_PATH.delete_if { |path| path.include?("/idnx") } + +require "test_helper" +require "support/http_helpers" +require "support/minitest_extensions" + +class NoPunycodeTest < Minitest::Test + include HTTPHelpers + + def test_do_not_punycode + assert_raises(URI::InvalidComponentError) do + HTTPX.get("http://bücher.ch") + end + end +end