From b668a2bf4e0eae6c10d8ac91bc58e3691d35dda8 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Mon, 13 Nov 2017 22:07:13 +1300 Subject: [PATCH] Add test for CommitCount --- commit_test.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 commit_test.go diff --git a/commit_test.go b/commit_test.go new file mode 100644 index 0000000..e1c09aa --- /dev/null +++ b/commit_test.go @@ -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) +}