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