package presence import "testing" func TestStateToFabricMapping(t *testing.T) { cases := []struct { in, want string }{ {"idle", "idle"}, {"working", "on_call"}, {"busy", "busy"}, {"offline", "offline"}, {"", ""}, {"weird", ""}, } for _, c := range cases { if got := StateToFabric(c.in); got != c.want { t.Errorf("StateToFabric(%q) = %q, want %q", c.in, got, c.want) } } }