| Index: appengine/cmd/milo/settings/funcs_test.go
|
| diff --git a/appengine/cmd/milo/settings/funcs_test.go b/appengine/cmd/milo/settings/funcs_test.go
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f4c6192a40e89d2d1c77c88545b18cc91305b346
|
| --- /dev/null
|
| +++ b/appengine/cmd/milo/settings/funcs_test.go
|
| @@ -0,0 +1,28 @@
|
| +// Copyright 2016 The LUCI Authors. All rights reserved.
|
| +// Use of this source code is governed under the Apache License, Version 2.0
|
| +// that can be found in the LICENSE file.
|
| +
|
| +package settings
|
| +
|
| +import (
|
| + "testing"
|
| + "time"
|
| +
|
| + . "github.com/smartystreets/goconvey/convey"
|
| +)
|
| +
|
| +func TestFuncs(t *testing.T) {
|
| + t.Parallel()
|
| +
|
| + Convey("humanDuration", t, func() {
|
| + Convey("3 hrs", func() {
|
| + h := humanDuration(3 * time.Hour)
|
| + So(h, ShouldEqual, "3 hrs")
|
| + })
|
| +
|
| + Convey("2 hrs 59 mins", func() {
|
| + h := humanDuration(2*time.Hour + 59*time.Minute)
|
| + So(h, ShouldEqual, "2 hrs 59 mins")
|
| + })
|
| + })
|
| +}
|
|
|