Skip to content

Commit

Permalink
Merge pull request #421 from supertokens/test/fix_test_errors
Browse files Browse the repository at this point in the history
test: fix test typos&errors
  • Loading branch information
porcellus authored Jul 11, 2024
2 parents 966a65a + ec728fd commit 38c30e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions recipe/emailpassword/authMode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1152,8 +1152,8 @@ func TestRefreshTokenBehaviour(t *testing.T) {
{getTokenTransferMethodRes: "header", authHeader: false, authCookie: true, output: "unauthorised", setTokens: "none", clearedTokens: "both"},
{getTokenTransferMethodRes: "cookie", authHeader: false, authCookie: true, output: "validatecookie", setTokens: "cookies", clearedTokens: "none"},
{getTokenTransferMethodRes: "any", authHeader: true, authCookie: false, output: "validateheader", setTokens: "headers", clearedTokens: "none"},
{getTokenTransferMethodRes: "header", authHeader: true, authCookie: false, output: "validateheader", setTokens: "headers", clearedTokens: "both"},
{getTokenTransferMethodRes: "cookie", authHeader: true, authCookie: false, output: "unauthorised", setTokens: "none", clearedTokens: "none"},
{getTokenTransferMethodRes: "header", authHeader: true, authCookie: false, output: "validateheader", setTokens: "headers", clearedTokens: "none"},
{getTokenTransferMethodRes: "cookie", authHeader: true, authCookie: false, output: "unauthorised", setTokens: "none", clearedTokens: "both"},
{getTokenTransferMethodRes: "any", authHeader: true, authCookie: true, output: "validateheader", setTokens: "headers", clearedTokens: "cookies"},
{getTokenTransferMethodRes: "header", authHeader: true, authCookie: true, output: "validateheader", setTokens: "headers", clearedTokens: "cookies"},
{getTokenTransferMethodRes: "cookie", authHeader: true, authCookie: true, output: "validatecookie", setTokens: "cookies", clearedTokens: "headers"},
Expand Down Expand Up @@ -1254,7 +1254,7 @@ func TestRefreshTokenBehaviour(t *testing.T) {
}
}

if behaviour.setTokens != "both" {
if behaviour.clearedTokens != "both" {
if behaviour.setTokens != "cookies" && behaviour.clearedTokens != "cookies" {
assert.Equal(t, refreshRes["sAccessToken"], "-not-present-")
assert.Equal(t, refreshRes["accessTokenExpiry"], "-not-present-")
Expand Down

0 comments on commit 38c30e0

Please sign in to comment.