summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorGusted <postmaster@gusted.xyz>2024-04-06 11:30:02 +0200
committerGusted <postmaster@gusted.xyz>2024-04-06 11:30:02 +0200
commiteea259055e0602419b2c7f6cc44ffa1b4379f847 (patch)
treeaa0f0d55193b7b93e05a40538c43249ff9413f97 /models
parentMerge pull request 'Fix #3030 add Cache-Control header for health-check' (#30... (diff)
downloadforgejo-eea259055e0602419b2c7f6cc44ffa1b4379f847.tar.xz
forgejo-eea259055e0602419b2c7f6cc44ffa1b4379f847.zip
Sort `BuiltinApplicationsClientIDs()` in test
- Ref https://codeberg.org/forgejo/forgejo/pulls/3069#issuecomment-1736290
Diffstat (limited to 'models')
-rw-r--r--models/auth/oauth2_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/models/auth/oauth2_test.go b/models/auth/oauth2_test.go
index 9a818a0bb3..5361f61db2 100644
--- a/models/auth/oauth2_test.go
+++ b/models/auth/oauth2_test.go
@@ -5,6 +5,7 @@ package auth_test
import (
"path/filepath"
+ "slices"
"testing"
auth_model "code.gitea.io/gitea/models/auth"
@@ -269,7 +270,9 @@ func TestOAuth2AuthorizationCode_TableName(t *testing.T) {
}
func TestBuiltinApplicationsClientIDs(t *testing.T) {
- assert.EqualValues(t, []string{"a4792ccc-144e-407e-86c9-5e7d8d9c3269", "e90ee53c-94e2-48ac-9358-a874fb9e0662", "d57cb8c4-630c-4168-8324-ec79935e18d4"}, auth_model.BuiltinApplicationsClientIDs())
+ clientIDs := auth_model.BuiltinApplicationsClientIDs()
+ slices.Sort(clientIDs)
+ assert.EqualValues(t, []string{"a4792ccc-144e-407e-86c9-5e7d8d9c3269", "d57cb8c4-630c-4168-8324-ec79935e18d4", "e90ee53c-94e2-48ac-9358-a874fb9e0662"}, clientIDs)
}
func TestOrphanedOAuth2Applications(t *testing.T) {