From 1202e3b03c3bb88cd3a63dae3866167564f1d25d Mon Sep 17 00:00:00 2001 From: Azul Date: Thu, 22 Sep 2016 11:31:01 +0200 Subject: hand on connection errors to dispatcher so it can handle it --- test/remote/nicknym_source_test.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/remote') diff --git a/test/remote/nicknym_source_test.rb b/test/remote/nicknym_source_test.rb index c95c820..b38a991 100644 --- a/test/remote/nicknym_source_test.rb +++ b/test/remote/nicknym_source_test.rb @@ -18,8 +18,10 @@ class RemoteNicknymSourceTest < Minitest::Test end def test_availablility_check - skip unless source.available_for? 'mail.bitmask.net' + source.available_for? 'mail.bitmask.net' refute source.available_for? 'dl.bitmask.net' # not a provider + rescue HTTP::ConnectionError => e + skip e.to_s end def test_successful_query @@ -28,12 +30,16 @@ class RemoteNicknymSourceTest < Minitest::Test json = JSON.parse response.content assert_equal email_with_key.to_s, json["address"] refute_empty json["openpgp"] + rescue HTTP::ConnectionError => e + skip e.to_s end def test_not_found response = source.query(email_without_key) skip if response.status == 200 assert response.status == 404 + rescue HTTP::ConnectionError => e + skip e.to_s end protected -- cgit v1.2.3