Explorar el Código

Add test for broken uri

tags/v2.0.0-rc1
9seconds hace 5 años
padre
commit
339840c14a
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5
    0
      config/type_blocklist_uri_test.go

+ 5
- 0
config/type_blocklist_uri_test.go Ver fichero

@@ -38,6 +38,11 @@ func (suite *TypeBlocklistURITestSuite) TestEmptyHost() {
38 38
 	suite.Error(typ.UnmarshalText([]byte("https:///path")))
39 39
 }
40 40
 
41
+func (suite *TypeBlocklistURITestSuite) TestIncorrectURL() {
42
+	typ := &config.TypeBlocklistURI{}
43
+	suite.Error(typ.UnmarshalText([]byte("h:/--")))
44
+}
45
+
41 46
 func (suite *TypeBlocklistURITestSuite) TestUnmarshalFail() {
42 47
 	rnd := make([]byte, 48)
43 48
 

Loading…
Cancelar
Guardar