Procházet zdrojové kódy

Add test for broken uri

tags/v2.0.0-rc1
9seconds před 5 roky
rodič
revize
339840c14a
1 změnil soubory, kde provedl 5 přidání a 0 odebrání
  1. 5
    0
      config/type_blocklist_uri_test.go

+ 5
- 0
config/type_blocklist_uri_test.go Zobrazit soubor

38
 	suite.Error(typ.UnmarshalText([]byte("https:///path")))
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
 func (suite *TypeBlocklistURITestSuite) TestUnmarshalFail() {
46
 func (suite *TypeBlocklistURITestSuite) TestUnmarshalFail() {
42
 	rnd := make([]byte, 48)
47
 	rnd := make([]byte, 48)
43
 
48
 

Načítá se…
Zrušit
Uložit