package httpapi import "testing" func TestParseAdminTaskSensitiveMode(t *testing.T) { tests := []struct { value string full bool accepted bool }{ {value: "", full: false, accepted: true}, {value: "masked", full: false, accepted: true}, {value: "FULL", full: true, accepted: true}, {value: "invalid", full: false, accepted: false}, } for _, test := range tests { full, accepted := parseAdminTaskSensitiveMode(test.value) if full != test.full || accepted != test.accepted { t.Fatalf("parseAdminTaskSensitiveMode(%q)=(%v,%v), want (%v,%v)", test.value, full, accepted, test.full, test.accepted) } } }