Quellcode durchsuchen

Add test for broken uri

tags/v2.0.0-rc1
9seconds vor 5 Jahren
Ursprung
Commit
339840c14a
1 geänderte Dateien mit 5 neuen und 0 gelöschten Zeilen
  1. 5
    0
      config/type_blocklist_uri_test.go

+ 5
- 0
config/type_blocklist_uri_test.go Datei anzeigen

@@ -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
 

Laden…
Abbrechen
Speichern