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

Method TestConfigScoped

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

Source from the content-addressed store, hash-verified

2372}
2373
2374func (s *RepositorySuite) TestConfigScoped(c *C) {
2375 r, _ := Init(memory.NewStorage(), nil)
2376 err := r.clone(context.Background(), &CloneOptions{
2377 URL: s.GetBasicLocalRepositoryURL(),
2378 })
2379 c.Assert(err, IsNil)
2380
2381 cfg, err := r.ConfigScoped(config.LocalScope)
2382 c.Assert(err, IsNil)
2383 c.Assert(cfg.User.Email, Equals, "")
2384
2385 cfg, err = r.ConfigScoped(config.SystemScope)
2386 c.Assert(err, IsNil)
2387 c.Assert(cfg.User.Email, Not(Equals), "")
2388}
2389
2390func (s *RepositorySuite) TestCommit(c *C) {
2391 r, _ := Init(memory.NewStorage(), nil)

Callers

nothing calls this directly

Calls 5

NewStorageFunction · 0.92
InitFunction · 0.85
cloneMethod · 0.80
ConfigScopedMethod · 0.80

Tested by

no test coverage detected