mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 21:54:01 +03:00
Test unmarshal nil for type duration
This commit is contained in:
@@ -18,6 +18,12 @@ type TypeDurationTestSuite struct {
|
||||
suite.Suite
|
||||
}
|
||||
|
||||
func (suite *TypeDurationTestSuite) TestUnmarshalNil() {
|
||||
typ := &config.TypeDuration{}
|
||||
suite.NoError(typ.UnmarshalText(nil))
|
||||
suite.EqualValues(0, typ.Value(0))
|
||||
}
|
||||
|
||||
func (suite *TypeDurationTestSuite) TestUnmarshalFail() {
|
||||
testData := []string{
|
||||
"1t",
|
||||
|
||||
Reference in New Issue
Block a user