From e7f2eb26e14b54e5b4b367a4e248bbdfdcd713bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Laszlo?= Date: Mon, 13 Feb 2023 18:53:02 +0100 Subject: [PATCH] Add unit test --- test/test_http_cookie_jar.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/test_http_cookie_jar.rb b/test/test_http_cookie_jar.rb index 8f57abf..0d49960 100644 --- a/test/test_http_cookie_jar.rb +++ b/test/test_http_cookie_jar.rb @@ -9,6 +9,15 @@ module TestHTTPCookieJar } end + def test_nonexistent_store_in_config + assert_raise_with_message( + ArgumentError, + /cookie store unavailable: :nonexistent, error: cannot load .*nonexistent_store/ + ) { + HTTP::CookieJar.new(store: :nonexistent) + } + end + def test_erroneous_store Dir.mktmpdir { |dir| Dir.mkdir(File.join(dir, 'http'))