test/toxiproxy_test.rb in toxiproxy-2.0.0 vs test/toxiproxy_test.rb in toxiproxy-2.0.1
- old
+ new
@@ -451,9 +451,18 @@
# Endpoint should not be duplicated.
assert_equal 1, WebMock::Config.instance.allow.count(@endpoint)
end
end
+ def test_invalidate_cache_http_on_host
+ old_value = Toxiproxy.uri
+ assert_equal 8474, Toxiproxy.http.port
+ Toxiproxy.host = "http://127.0.0.1:8475"
+ assert_equal 8475, Toxiproxy.http.port
+ ensure
+ Toxiproxy.host = old_value
+ end
+
private
def with_webmock_enabled
WebMock.enable!
WebMock.disable_net_connect!