mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-02 00:11:56 +03:00
Update test coverage for typeblocklisturi
This commit is contained in:
@@ -22,6 +22,22 @@ type TypeBlocklistURITestSuite struct {
|
|||||||
suite.Suite
|
suite.Suite
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (suite *TypeBlocklistURITestSuite) TestUnmarshalNil() {
|
||||||
|
typ := &config.TypeBlocklistURI{}
|
||||||
|
suite.NoError(typ.UnmarshalText(nil))
|
||||||
|
suite.Empty(typ.String())
|
||||||
|
}
|
||||||
|
|
||||||
|
func (suite *TypeBlocklistURITestSuite) TestUnknownSchema() {
|
||||||
|
typ := &config.TypeBlocklistURI{}
|
||||||
|
suite.Error(typ.UnmarshalText([]byte("gopher://lalala")))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (suite *TypeBlocklistURITestSuite) TestEmptyHost() {
|
||||||
|
typ := &config.TypeBlocklistURI{}
|
||||||
|
suite.Error(typ.UnmarshalText([]byte("https:///path")))
|
||||||
|
}
|
||||||
|
|
||||||
func (suite *TypeBlocklistURITestSuite) TestUnmarshalFail() {
|
func (suite *TypeBlocklistURITestSuite) TestUnmarshalFail() {
|
||||||
rnd := make([]byte, 48)
|
rnd := make([]byte, 48)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user