Add test for CommitCount

This commit is contained in:
Sandro Santilli
2017-11-13 22:07:13 +13:00
parent 9fca2020be
commit b668a2bf4e
+15
View File
@@ -0,0 +1,15 @@
// Copyright 2017 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package git
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestCommitCount(t *testing.T) {
commitsCount, _ := CommitsCount(".", "d86a90f801dbe279db095437a8c7ea42c60e8d98")
assert.Equal(t, int64(3), commitsCount)
}