From 339840c14ad3660ab9cc1ea6a9101d0aa6c9ee42 Mon Sep 17 00:00:00 2001 From: 9seconds Date: Thu, 1 Apr 2021 17:21:38 +0300 Subject: [PATCH] Add test for broken uri --- config/type_blocklist_uri_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/type_blocklist_uri_test.go b/config/type_blocklist_uri_test.go index 6e0b260..3d53135 100644 --- a/config/type_blocklist_uri_test.go +++ b/config/type_blocklist_uri_test.go @@ -38,6 +38,11 @@ func (suite *TypeBlocklistURITestSuite) TestEmptyHost() { suite.Error(typ.UnmarshalText([]byte("https:///path"))) } +func (suite *TypeBlocklistURITestSuite) TestIncorrectURL() { + typ := &config.TypeBlocklistURI{} + suite.Error(typ.UnmarshalText([]byte("h:/--"))) +} + func (suite *TypeBlocklistURITestSuite) TestUnmarshalFail() { rnd := make([]byte, 48)