From 7922845e7065b22221c28800926c0eb9e55045e1 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 18 Apr 2024 16:33:52 +0800 Subject: [PATCH] Add test for the tablename --- models/auth/oauth2_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/models/auth/oauth2_test.go b/models/auth/oauth2_test.go index 122d43098c..fe6cbf6cf2 100644 --- a/models/auth/oauth2_test.go +++ b/models/auth/oauth2_test.go @@ -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())