1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 10:48:37 +00:00

Add test for the tablename

This commit is contained in:
Lunny Xiao
2024-04-18 16:33:52 +08:00
parent 59e020755f
commit 7922845e70

View File

@@ -13,7 +13,12 @@ import (
"github.com/stretchr/testify/assert"
)
//////////////////// Application
func TestApplicationTableName(t *testing.T) {
e := unittest.GetXORMEngine()
tableInfo, err := e.TableInfo(new(auth_model.OAuth2Application))
assert.NoError(t, err)
assert.EqualValues(t, "oauth2_application", tableInfo.Name)
}
func TestOAuth2Application_GenerateClientSecret(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())