MCPcopy
hub / github.com/go-git/go-git / TestCreateRemoteAnonymous

Method TestCreateRemoteAnonymous

repository_test.go:355–364  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

353}
354
355func (s *RepositorySuite) TestCreateRemoteAnonymous(c *C) {
356 r, _ := Init(memory.NewStorage(), nil)
357 remote, err := r.CreateRemoteAnonymous(&config.RemoteConfig{
358 Name: "anonymous",
359 URLs: []string{"http://foo/foo.git"},
360 })
361
362 c.Assert(err, IsNil)
363 c.Assert(remote.Config().Name, Equals, "anonymous")
364}
365
366func (s *RepositorySuite) TestCreateRemoteAnonymousInvalidName(c *C) {
367 r, _ := Init(memory.NewStorage(), nil)

Callers

nothing calls this directly

Calls 4

NewStorageFunction · 0.92
InitFunction · 0.85
CreateRemoteAnonymousMethod · 0.80
ConfigMethod · 0.65

Tested by

no test coverage detected