summaryrefslogtreecommitdiff
path: root/git_test.go
diff options
context:
space:
mode:
authorJesse Ezell <[email protected]>2014-04-02 10:31:48 -0700
committerJesse Ezell <[email protected]>2014-04-02 10:31:48 -0700
commitb660db0a4bf82af893e7eb120c3001cecf593fa0 (patch)
treed421c326b7da4ba119afe44d3b0847ff7e2f9e77 /git_test.go
parent9cd1d129bcd567ef65137783a603f8d898d8d933 (diff)
make it possible to handle errors
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 6542ca0..f4515a6 100644
--- a/git_test.go
+++ b/git_test.go
@@ -62,3 +62,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")
+ }
+}