diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2015-10-23 00:35:11 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2015-10-23 00:35:11 +0200 |
commit | bdd9a92789d4a86b20a8d3df462df373f41acf23 (patch) | |
tree | 02d06216eba1b85a5b3c10af0865c6f4761a6464 /remote_test.go | |
parent | b359f11ea09e642695edcd114b463da4395b10c1 (diff) | |
download | go-git-bdd9a92789d4a86b20a8d3df462df373f41acf23.tar.gz |
new remote abstraction
Diffstat (limited to 'remote_test.go')
-rw-r--r-- | remote_test.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/remote_test.go b/remote_test.go new file mode 100644 index 0000000..511b690 --- /dev/null +++ b/remote_test.go @@ -0,0 +1,29 @@ +package git + +import . "gopkg.in/check.v1" + +type SuiteRemote struct{} + +var _ = Suite(&SuiteRemote{}) + +const RepositoryFixture = "https://github.com/tyba/git-fixture" + +func (s *SuiteRemote) TestConnect(c *C) { + r, err := NewRemote(RepositoryFixture) + c.Assert(err, IsNil) + c.Assert(r.Connect(), IsNil) +} + +func (s *SuiteRemote) TestDefaultBranch(c *C) { + r, err := NewRemote(RepositoryFixture) + c.Assert(err, IsNil) + c.Assert(r.Connect(), IsNil) + c.Assert(r.DefaultBranch(), Equals, "refs/heads/master") +} + +func (s *SuiteRemote) TestCapabilities(c *C) { + r, err := NewRemote(RepositoryFixture) + c.Assert(err, IsNil) + c.Assert(r.Connect(), IsNil) + c.Assert(r.Capabilities().Get("agent"), HasLen, 1) +} |