MCPcopy Index your code
hub / github.com/go-git/go-git / TestCreateRemoteAnonymousInvalidName

Method TestCreateRemoteAnonymousInvalidName

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

Source from the content-addressed store, hash-verified

364}
365
366func (s *RepositorySuite) TestCreateRemoteAnonymousInvalidName(c *C) {
367 r, _ := Init(memory.NewStorage(), nil)
368 remote, err := r.CreateRemoteAnonymous(&config.RemoteConfig{
369 Name: "not_anonymous",
370 URLs: []string{"http://foo/foo.git"},
371 })
372
373 c.Assert(err, Equals, ErrAnonymousRemoteName)
374 c.Assert(remote, IsNil)
375}
376
377func (s *RepositorySuite) TestCreateRemoteAnonymousInvalid(c *C) {
378 r, _ := Init(memory.NewStorage(), nil)

Callers

nothing calls this directly

Calls 3

NewStorageFunction · 0.92
InitFunction · 0.85
CreateRemoteAnonymousMethod · 0.80

Tested by

no test coverage detected