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 TestNotificationActionsOffByDefault(t *testing.T) {
6 for _, value := range []string{"", "0", "true", "1"} {
7 env := map[string]string{"EQUIPO_ORIGIN": "https://equipo.bds.oncarlos.com", "EQUIPO_INSTANCE_KEY": "fixture", "CARLOS_MAIL": "submit", "EQUIPO_NOTIFICATION_ACTIONS": value}
8 cfg, err := LoadConfig(func(k string) string { return env[k] })
9 if err != nil {
10 t.Fatal(err)
11 }
12 if cfg.NotificationActions != (value == "1") {
13 t.Fatal(value, cfg.NotificationActions)
14 }
15 }
16}
17