diff options
Diffstat (limited to 'repository_test.go')
-rw-r--r-- | repository_test.go | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/repository_test.go b/repository_test.go index adc722c..0b6a603 100644 --- a/repository_test.go +++ b/repository_test.go @@ -1,7 +1,9 @@ package git import ( + "bytes" "fmt" + "os" "os/exec" "path/filepath" "strings" @@ -11,10 +13,6 @@ import ( "gopkg.in/src-d/go-git.v4/plumbing" "gopkg.in/src-d/go-git.v4/storage/memory" - "os" - - "bytes" - . "gopkg.in/check.v1" ) @@ -45,6 +43,21 @@ func (s *RepositorySuite) TestCreateRemoteAndRemote(c *C) { c.Assert(alt.Config().Name, Equals, "foo") } +func (s *RepositorySuite) TestRemoteWithProgress(c *C) { + buf := bytes.NewBuffer(nil) + + r := NewMemoryRepository() + r.Progress = buf + + remote, err := r.CreateRemote(&config.RemoteConfig{ + Name: "foo", + URL: "http://foo/foo.git", + }) + + c.Assert(err, IsNil) + c.Assert(remote.p, Equals, buf) +} + func (s *RepositorySuite) TestCreateRemoteInvalid(c *C) { r := NewMemoryRepository() remote, err := r.CreateRemote(&config.RemoteConfig{}) |