Skip to content

Commit 890ee07

Browse files
committed
Added first jwt config parsing test
1 parent 67f5b11 commit 890ee07

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

plugins/jwt/jwt_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,12 @@ import (
55
)
66

77
func TestParseConfig(t *testing.T) {
8-
8+
jwtPlugin := &JWT{}
9+
err := jwtPlugin.ParseConfig("test_config/jwt.toml")
10+
if err != nil {
11+
t.Error(err)
12+
}
13+
if string(jwtPlugin.Secret) != "secret123" {
14+
t.Errorf("Secret key was parsed incorrectly. Expected: '%v', but got: '%v'", "secret123", string(jwtPlugin.Secret))
15+
}
916
}

0 commit comments

Comments
 (0)