summaryrefslogtreecommitdiff
path: root/describe_test.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2017-01-20 13:13:49 +0000
committerCarlos Martín Nieto <[email protected]>2017-01-20 13:20:30 +0000
commit9f4e0a46b6f4cefd652f1e20c068e5545d7cfc9d (patch)
treee72654bd3d56e01ef290f6c6dec97368c5a419fe /describe_test.go
parentf0370741989f40b597c99e6093ce7fa0b1983397 (diff)
Update libgit2 to df4dfaad
Diffstat (limited to 'describe_test.go')
-rw-r--r--describe_test.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/describe_test.go b/describe_test.go
index f0a45f4..3181f23 100644
--- a/describe_test.go
+++ b/describe_test.go
@@ -93,14 +93,16 @@ func TestDescribeCommit(t *testing.T) {
func checkDescribeNoRefsFound(t *testing.T, err error) {
// The failure happens at wherever we were called, not here
_, file, line, ok := runtime.Caller(1)
+ expectedString := "no reference found, cannot describe anything"
if !ok {
t.Fatalf("Unable to get caller")
}
- if err == nil || !strings.Contains(err.Error(), "No reference found, cannot describe anything") {
+ if err == nil || !strings.Contains(err.Error(), expectedString) {
t.Fatalf(
- "%s:%v: was expecting error 'No reference found, cannot describe anything', got %v",
+ "%s:%v: was expecting error %v, got %v",
path.Base(file),
line,
+ expectedString,
err,
)
}