aboutsummaryrefslogtreecommitdiffstats
path: root/repository_test.go
diff options
context:
space:
mode:
authorSaeed Rasooli <saeed.gnu@gmail.com>2019-11-29 16:44:43 +0330
committerSaeed Rasooli <saeed.gnu@gmail.com>2019-11-29 16:46:45 +0330
commit027dadf289dcf974405d283d13d5a856b0988b38 (patch)
tree4c76e2e40eb5c0e27c51bcf821fc71cc52459afb /repository_test.go
parente0378b2c67fffba7aa98f1fb4355bc1bc58b215b (diff)
downloadgo-git-027dadf289dcf974405d283d13d5a856b0988b38.tar.gz
add back test for NewCommitFileIterFromIter
Signed-off-by: Saeed Rasooli <saeed.gnu@gmail.com>
Diffstat (limited to 'repository_test.go')
-rw-r--r--repository_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/repository_test.go b/repository_test.go
index 65c1423..06b748a 100644
--- a/repository_test.go
+++ b/repository_test.go
@@ -1668,6 +1668,17 @@ func (m *mockErrCommitIter) Close() {}
func (s *RepositorySuite) TestLogFileWithError(c *C) {
fileName := "README"
+ cIter := object.NewCommitFileIterFromIter(fileName, &mockErrCommitIter{}, false)
+ defer cIter.Close()
+
+ err := cIter.ForEach(func(commit *object.Commit) error {
+ return nil
+ })
+ c.Assert(err, NotNil)
+}
+
+func (s *RepositorySuite) TestLogPathWithError(c *C) {
+ fileName := "README"
pathIter := func(path string) bool {
return path == fileName
}