You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
boundary/internal/auth/oidc/state_test.go

25 lines
438 B

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)
}
})
}
}