aboutsummaryrefslogtreecommitdiffstats
path: root/clients/common/common_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-08-13 20:07:21 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2016-08-13 20:07:21 +0200
commita65bcbc63bef24cf219c63d1b8cfb309c95d1c0f (patch)
tree973644feaf08adc916dab8fb95d1f6c86194c9c1 /clients/common/common_test.go
parenta6ea9e8dd2eda48c8405f609e0fb444d3717af53 (diff)
downloadgo-git-a65bcbc63bef24cf219c63d1b8cfb309c95d1c0f.tar.gz
clients: new Endpoint implementation and InstallProtocol function
Diffstat (limited to 'clients/common/common_test.go')
-rw-r--r--clients/common/common_test.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/clients/common/common_test.go b/clients/common/common_test.go
index 5be6eba..80934fc 100644
--- a/clients/common/common_test.go
+++ b/clients/common/common_test.go
@@ -17,20 +17,15 @@ type SuiteCommon struct{}
var _ = Suite(&SuiteCommon{})
func (s *SuiteCommon) TestNewEndpoint(c *C) {
- e, err := NewEndpoint("git@github.com:user/repository.git")
+ e, err := NewEndpoint("ssh://git@github.com/user/repository.git")
c.Assert(err, IsNil)
- c.Assert(e, Equals, Endpoint("https://github.com/user/repository.git"))
+ c.Assert(e.String(), Equals, "ssh://git@github.com/user/repository.git")
}
func (s *SuiteCommon) TestNewEndpointWrongForgat(c *C) {
e, err := NewEndpoint("foo")
c.Assert(err, Not(IsNil))
- c.Assert(e, Equals, Endpoint(""))
-}
-
-func (s *SuiteCommon) TestEndpointService(c *C) {
- e, _ := NewEndpoint("git@github.com:user/repository.git")
- c.Assert(e.Service("foo"), Equals, "https://github.com/user/repository.git/info/refs?service=foo")
+ c.Assert(e.Host, Equals, "")
}
const CapabilitiesFixture = "6ecf0ef2c2dffb796033e5a02219af86ec6584e5 HEADmulti_ack thin-pack side-band side-band-64k ofs-delta shallow no-progress include-tag multi_ack_detailed no-done symref=HEAD:refs/heads/master agent=git/2:2.4.8~dbussink-fix-enterprise-tokens-compilation-1167-gc7006cf"