| Index: go/src/infra/libs/git/emptyObject_test.go
|
| diff --git a/go/src/infra/libs/git/emptyObject_test.go b/go/src/infra/libs/git/emptyObject_test.go
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..62eecee1d70a4cd31299ed30fa51b6d8e40d6ae5
|
| --- /dev/null
|
| +++ b/go/src/infra/libs/git/emptyObject_test.go
|
| @@ -0,0 +1,30 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +package git
|
| +
|
| +import (
|
| + "testing"
|
| +
|
| + . "github.com/smartystreets/goconvey/convey"
|
| +)
|
| +
|
| +func TestEmptyObject(t *testing.T) {
|
| + t.Parallel()
|
| +
|
| + db := MakeObjectID("deadbeefdeadbeefdeadbeefdeadbeefdeadbeef")
|
| +
|
| + Convey("EmptyObject", t, func() {
|
| + for _, typ := range []string{"blob", "commit", "tree"} {
|
| + typ := MakeObjectType(typ)
|
| + Convey("NewEmptyObject("+typ.String()+")", func() {
|
| + e := NewEmptyObject(typ, db)
|
| + So(e, ShouldNotBeNil)
|
| + So(e.Complete(), ShouldBeFalse)
|
| + So(e.ID(), ShouldEqual, db)
|
| + })
|
| + }
|
| + })
|
| +
|
| +}
|
|
|