aboutsummaryrefslogtreecommitdiffstats
path: root/services/auth
diff options
context:
space:
mode:
Diffstat (limited to 'services/auth')
-rw-r--r--services/auth/oauth2_test.go2
-rw-r--r--services/auth/source/oauth2/source_sync_test.go8
2 files changed, 5 insertions, 5 deletions
diff --git a/services/auth/oauth2_test.go b/services/auth/oauth2_test.go
index 75c231ff7a..b706847e8e 100644
--- a/services/auth/oauth2_test.go
+++ b/services/auth/oauth2_test.go
@@ -28,7 +28,7 @@ func TestUserIDFromToken(t *testing.T) {
o := OAuth2{}
uid := o.userIDFromToken(context.Background(), token, ds)
assert.Equal(t, int64(user_model.ActionsUserID), uid)
- assert.Equal(t, ds["IsActionsToken"], true)
+ assert.Equal(t, true, ds["IsActionsToken"])
assert.Equal(t, ds["ActionsTaskID"], int64(RunningTaskID))
})
}
diff --git a/services/auth/source/oauth2/source_sync_test.go b/services/auth/source/oauth2/source_sync_test.go
index 25408e8727..893ed62502 100644
--- a/services/auth/source/oauth2/source_sync_test.go
+++ b/services/auth/source/oauth2/source_sync_test.go
@@ -64,8 +64,8 @@ func TestSource(t *testing.T) {
ok, err := user_model.GetExternalLogin(context.Background(), e)
assert.NoError(t, err)
assert.True(t, ok)
- assert.Equal(t, e.RefreshToken, "refresh")
- assert.Equal(t, e.AccessToken, "token")
+ assert.Equal(t, "refresh", e.RefreshToken)
+ assert.Equal(t, "token", e.AccessToken)
u, err := user_model.GetUserByID(context.Background(), user.ID)
assert.NoError(t, err)
@@ -89,8 +89,8 @@ func TestSource(t *testing.T) {
ok, err := user_model.GetExternalLogin(context.Background(), e)
assert.NoError(t, err)
assert.True(t, ok)
- assert.Equal(t, e.RefreshToken, "")
- assert.Equal(t, e.AccessToken, "")
+ assert.Equal(t, "", e.RefreshToken)
+ assert.Equal(t, "", e.AccessToken)
u, err := user_model.GetUserByID(context.Background(), user.ID)
assert.NoError(t, err)