Add test for broken uri

This commit is contained in:
9seconds
2021-04-01 17:21:38 +03:00
parent a368975959
commit 339840c14a
+5
View File
@@ -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)