From 529f8438980a29999ca44f3a3e74eb317d0cf3c5 Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Mon, 15 Oct 2018 11:28:12 +0200 Subject: use remote name in fetch while clone, test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Máximo Cuadros --- repository_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'repository_test.go') diff --git a/repository_test.go b/repository_test.go index b78fbb7..9303bef 100644 --- a/repository_test.go +++ b/repository_test.go @@ -566,6 +566,19 @@ func (s *RepositorySuite) TestPlainClone(c *C) { c.Assert(cfg.Branches["master"].Name, Equals, "master") } +func (s *RepositorySuite) TestPlainCloneWithRemoteName(c *C) { + r, err := PlainClone(c.MkDir(), false, &CloneOptions{ + URL: s.GetBasicLocalRepositoryURL(), + RemoteName: "test", + }) + + c.Assert(err, IsNil) + + remote, err := r.Remote("test") + c.Assert(err, IsNil) + c.Assert(remote, NotNil) +} + func (s *RepositorySuite) TestPlainCloneContext(c *C) { ctx, cancel := context.WithCancel(context.Background()) cancel() -- cgit