mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-01 00:24:02 +03:00
Add unmarshal nil test for prefer ip
This commit is contained in:
@@ -18,6 +18,12 @@ type TypePreferIPTestSuite struct {
|
||||
suite.Suite
|
||||
}
|
||||
|
||||
func (suite *TypePreferIPTestSuite) TestUnmarshalNil() {
|
||||
typ := &config.TypePreferIP{}
|
||||
suite.NoError(typ.UnmarshalText(nil))
|
||||
suite.Empty(typ.String())
|
||||
}
|
||||
|
||||
func (suite *TypePreferIPTestSuite) TestUnmarshalFail() {
|
||||
testData := []string{
|
||||
"p",
|
||||
|
||||
Reference in New Issue
Block a user