We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ae5d9c commit 187c686Copy full SHA for 187c686
util_test.go
@@ -53,6 +53,25 @@ func TestTokenListContainsValue(t *testing.T) {
53
}
54
55
56
+var isValidChallengeKeyTests = []struct {
57
+ key string
58
+ ok bool
59
+}{
60
+ {"dGhlIHNhbXBsZSBub25jZQ==", true},
61
+ {"", false},
62
+ {"InvalidKey", false},
63
+ {"WHQ4eXhscUtKYjBvOGN3WEdtOEQ=", false},
64
+}
65
+
66
+func TestIsValidChallengeKey(t *testing.T) {
67
+ for _, tt := range isValidChallengeKeyTests {
68
+ ok := isValidChallengeKey(tt.key)
69
+ if ok != tt.ok {
70
+ t.Errorf("isValidChallengeKey returns %v, want %v", ok, tt.ok)
71
+ }
72
73
74
75
var parseExtensionTests = []struct {
76
value string
77
extensions []map[string]string
0 commit comments