[rubygems/rubygems] Close the server for test

https://github.com/rubygems/rubygems/commit/bf5e82fd14
This commit is contained in:
Nobuyoshi Nakada 2023-04-12 15:59:49 +09:00 committed by git
parent 851344965a
commit f06a48a92a

View File

@ -10,6 +10,12 @@ class WebauthnListenerTest < Gem::TestCase
@port = @server.addr[1].to_s
end
def teardown
@thread.kill.join if @thread
@server&.close
super
end
def test_wait_for_otp_code_get_follows_options
wait_for_otp_code
assert Gem::MockBrowser.options(URI("http://localhost:#{@port}?code=xyz")).is_a? Net::HTTPNoContent