diff options
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) +} |