summaryrefslogtreecommitdiff
path: root/git_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'git_test.go')
-rw-r--r--git_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/git_test.go b/git_test.go
index 6a3aeaa..cbf3227 100644
--- a/git_test.go
+++ b/git_test.go
@@ -93,3 +93,10 @@ func TestOidZero(t *testing.T) {
t.Error("Zero Oid is not zero")
}
}
+
+func TestEmptyOid(t *testing.T) {
+ _, err := NewOid("")
+ if err == nil || !IsErrorCode(err, ErrGeneric) {
+ t.Fatal("Should have returned invalid error")
+ }
+}