diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2015-11-05 19:08:20 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2015-11-05 20:55:46 +0100 |
commit | 6be0bc1233b1a31e749354f1d54104b49d5bf19b (patch) | |
tree | a9fd259944a42322050247ed6b5393150f2c4cb8 /remote_test.go | |
parent | a80d56b21142096f458758405736f3d567c175f5 (diff) | |
download | go-git-6be0bc1233b1a31e749354f1d54104b49d5bf19b.tar.gz |
clients: new AuthMethod and ConnectWithAuth
Diffstat (limited to 'remote_test.go')
-rw-r--r-- | remote_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/remote_test.go b/remote_test.go index c222e7d..7a40deb 100644 --- a/remote_test.go +++ b/remote_test.go @@ -1,6 +1,7 @@ package git import ( + "gopkg.in/src-d/go-git.v2/clients/http" "gopkg.in/src-d/go-git.v2/core" "gopkg.in/src-d/go-git.v2/formats/packfile" @@ -13,6 +14,13 @@ var _ = Suite(&SuiteRemote{}) const RepositoryFixture = "https://github.com/tyba/git-fixture" +func (s *SuiteRemote) TestNewAuthenticatedRemote(c *C) { + auth := &http.BasicAuth{} + r, err := NewAuthenticatedRemote(RepositoryFixture, auth) + c.Assert(err, IsNil) + c.Assert(r.Auth, Equals, auth) +} + func (s *SuiteRemote) TestConnect(c *C) { r, err := NewRemote(RepositoryFixture) c.Assert(err, IsNil) |