Files
threshold/internal/auth/oidc/state_test.go
T
dd0f34bc35 Add new OIDC auth method. (#1090)
Co-authored-by: Todd Knight <T.Alan.Knight@gmail.com>
Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
2021-04-08 20:54:32 -04:00

25 lines
438 B
Go

package oidc
import "testing"
func Test_validState(t *testing.T) {
tests := []struct {
s string
want bool
}{
{"bad", false},
{"", false},
{"unknown", false},
{"inactive", true},
{"active-private", true},
{"active-public", true},
}
for _, tt := range tests {
t.Run(tt.s, func(t *testing.T) {
if got := validState(tt.s); got != tt.want {
t.Errorf("validState() = %v, want %v", got, tt.want)
}
})
}
}