Skip to content

Commit

Permalink
Add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
andrelaszlo committed Feb 13, 2023
1 parent 44374a7 commit e7f2eb2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/test_http_cookie_jar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ def test_nonexistent_store
}
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'))
Expand Down

0 comments on commit e7f2eb2

Please sign in to comment.