route/vendor/github.com/mitchellh/copystructure/copier_time_test.go

18 lines
266 B
Go
Raw Normal View History

2017-12-02 23:34:35 +00:00
package copystructure
import (
"testing"
"time"
)
func TestTimeCopier(t *testing.T) {
v := time.Now().UTC()
result, err := timeCopier(v)
if err != nil {
t.Fatalf("err: %s", err)
}
if result.(time.Time) != v {
t.Fatalf("bad: %#v\n\n%#v", v, result)
}
}