oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1package equipo
2
3import "testing"
4
5func TestGitHubFlagExplicit(t *testing.T) {
6 for _, value := range []string{"", "0", "true", "1"} {
7 env := map[string]string{"EQUIPO_ORIGIN": "https://equipo.example", "EQUIPO_INSTANCE_KEY": "test-key", "CARLOS_MAIL": "submit", "EQUIPO_GITHUB": value}
8 cfg, err := LoadConfig(func(k string) string { return env[k] })
9 if err != nil {
10 t.Fatal(err)
11 }
12 if cfg.GitHubEnabled != (value == "1") {
13 t.Fatalf("GitHub flag %q: %v", value, cfg.GitHubEnabled)
14 }
15 }
16}
17