Sfoglia il codice sorgente

Add test for broken uri

tags/v2.0.0-rc1
9seconds 5 anni fa
parent
commit
339840c14a
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5
    0
      config/type_blocklist_uri_test.go

+ 5
- 0
config/type_blocklist_uri_test.go Vedi File

@@ -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…
Annulla
Salva