From 6be0bc1233b1a31e749354f1d54104b49d5bf19b Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Thu, 5 Nov 2015 19:08:20 +0100 Subject: clients: new AuthMethod and ConnectWithAuth --- remote_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'remote_test.go') 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) -- cgit