mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 13:54:02 +03:00
Update test coverage for typeblocklisturi
This commit is contained in:
@@ -22,6 +22,22 @@ type TypeBlocklistURITestSuite struct {
|
||||
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() {
|
||||
rnd := make([]byte, 48)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user