Skip to content

Commit

Permalink
Test with malformed input
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbanham committed Mar 4, 2019
1 parent 73fd6a9 commit f85a72d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ func TestString(t *testing.T) {
precision: "hour",
result: "2 days 1 hour",
},
{
duration: time.Hour*49 + time.Second,
precision: "foobarlalala",
result: "2 days 1 hour 1 second",
},
{
duration: time.Hour*49 + time.Second,
precision: "",
result: "2 days 1 hour 1 second",
},
}

for _, fixture := range data {
Expand Down

0 comments on commit f85a72d

Please sign in to comment.