Skip to content

Commit f3525a4

Browse files
committed
fix test
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
1 parent 8b4d61f commit f3525a4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

internal/outpost/proxyv2/application/auth_test.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"testing"
88

99
"github.com/gorilla/sessions"
10+
"github.com/mitchellh/mapstructure"
1011
"github.com/stretchr/testify/assert"
1112
"github.com/stretchr/testify/require"
1213

@@ -94,12 +95,9 @@ func TestClaimsMapSerialization(t *testing.T) {
9495
"raw_token": "not-a-real-token",
9596
}
9697

97-
// Convert map to Claims using JSON marshaling (like getClaimsFromSession does)
98-
jsonData, err := json.Marshal(claimsMap)
99-
require.NoError(t, err)
100-
98+
// Convert map to Claims using mapstructure marshaling (like getClaimsFromSession does)
10199
var claims types.Claims
102-
err = json.Unmarshal(jsonData, &claims)
100+
err := mapstructure.Decode(claimsMap, &claims)
103101
require.NoError(t, err)
104102

105103
// Verify fields

0 commit comments

Comments
 (0)