Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong table name #30557

Merged
merged 15 commits into from
Apr 23, 2024
Prev Previous commit
Next Next commit
Add test for the tablename
  • Loading branch information
lunny committed Apr 18, 2024
commit 7922845e7065b22221c28800926c0eb9e55045e1
7 changes: 6 additions & 1 deletion models/auth/oauth2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
lunny marked this conversation as resolved.
Show resolved Hide resolved

func TestOAuth2Application_GenerateClientSecret(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
Expand Down