MCPcopy Create free account
hub / github.com/cwarden/git-add--interactive / TestGetConfigBool

Function TestGetConfigBool

internal/git/repository_test.go:28–43  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

26}
27
28func TestGetConfigBool(t *testing.T) {
29 wd, err := os.Getwd()
30 if err != nil {
31 t.Fatal(err)
32 }
33
34 repo, err := NewRepository(wd)
35 if err != nil {
36 t.Skip("Not in a git repository, skipping test")
37 }
38
39 result := repo.GetConfigBool("nonexistent.config.key")
40 if result {
41 t.Error("Non-existent config key should return false")
42 }
43}
44
45func TestIsInitialCommit(t *testing.T) {
46 wd, err := os.Getwd()

Callers

nothing calls this directly

Calls 2

GetConfigBoolMethod · 0.95
NewRepositoryFunction · 0.85

Tested by

no test coverage detected