aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/storer/object_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/storer/object_test.go')
-rw-r--r--plumbing/storer/object_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/plumbing/storer/object_test.go b/plumbing/storer/object_test.go
index da0db81..9a6959d 100644
--- a/plumbing/storer/object_test.go
+++ b/plumbing/storer/object_test.go
@@ -133,6 +133,15 @@ func (o *MockObjectStorage) SetEncodedObject(obj plumbing.EncodedObject) (plumbi
return plumbing.ZeroHash, nil
}
+func (o *MockObjectStorage) HasEncodedObject(h plumbing.Hash) error {
+ for _, o := range o.db {
+ if o.Hash() == h {
+ return nil
+ }
+ }
+ return plumbing.ErrObjectNotFound
+}
+
func (o *MockObjectStorage) EncodedObject(t plumbing.ObjectType, h plumbing.Hash) (plumbing.EncodedObject, error) {
for _, o := range o.db {
if o.Hash() == h {