Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-22 01:44:24 +01:00

Sort BuiltinApplicationsClientIDs() in test

- Ref https://codeberg.org/forgejo/forgejo/pulls/3069#issuecomment-1736290
This commit is contained in:
Gusted 2024-04-06 11:30:02 +02:00
parent 3093f8765f
commit eea259055e
No known key found for this signature in database
GPG key ID: FD821B732837125F

View file

@ -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) {