Skip to content

Commit

Permalink
Replace TTL format test to the more compleete expression
Browse files Browse the repository at this point in the history
  • Loading branch information
koltsov-iv committed Jun 19, 2023
1 parent af2713b commit a72f96a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/types/deploy_ttl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
)

func Test_DurationUnmarshal_withSpace_shouldBeParsed(t *testing.T) {
value := `"1h 30m"`
value := `"2h 46m 40s"`
var result types.Duration
err := json.Unmarshal([]byte(value), &result)
require.NoError(t, err)
data, err := result.MarshalJSON()
require.NoError(t, err)
assert.Equal(t, `"1h30m"`, string(data))
assert.Equal(t, `"2h46m40s"`, string(data))
}

0 comments on commit a72f96a

Please sign in to comment.