aboutsummaryrefslogtreecommitdiffstats
path: root/repository_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2015-11-17 09:19:51 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2015-11-17 09:19:51 +0100
commiteb57cb07025845868e40e3994ba2ec818fd3b4f7 (patch)
treeabab30e22f524efa913d0f60ffa40d3bd5fdd596 /repository_test.go
parent491de646e625801d2f809ed4a99c7ace019a3f15 (diff)
downloadgo-git-eb57cb07025845868e40e3994ba2ec818fd3b4f7.tar.gz
iters: add IsClosed field, fixes #4
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 421160d..a8fe50a 100644
--- a/repository_test.go
+++ b/repository_test.go
@@ -69,3 +69,14 @@ func (s *SuiteRepository) TestCommits(c *C) {
c.Assert(count, Equals, 8)
}
+
+func (s *SuiteRepository) TestCommitIterClosePanic(c *C) {
+ r, err := NewRepository(RepositoryFixture, nil)
+ r.Remotes["origin"].upSrv = &MockGitUploadPackService{}
+
+ c.Assert(err, IsNil)
+ c.Assert(r.Pull("origin", "refs/heads/master"), IsNil)
+
+ commits := r.Commits()
+ commits.Close()
+}