aboutsummaryrefslogtreecommitdiffstats
path: root/models/auth/source_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/auth/source_test.go')
-rw-r--r--models/auth/source_test.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/models/auth/source_test.go b/models/auth/source_test.go
index 36e76d5e28..84aede0a6b 100644
--- a/models/auth/source_test.go
+++ b/models/auth/source_test.go
@@ -13,6 +13,8 @@ import (
"code.gitea.io/gitea/modules/json"
"github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+ "xorm.io/xorm"
"xorm.io/xorm/schemas"
)
@@ -54,7 +56,8 @@ func TestDumpAuthSource(t *testing.T) {
sb := new(strings.Builder)
- db.DumpTables([]*schemas.Table{authSourceSchema}, sb)
-
+ // TODO: this test is quite hacky, it should use a low-level "select" (without model processors) but not a database dump
+ engine := db.GetEngine(db.DefaultContext).(*xorm.Engine)
+ require.NoError(t, engine.DumpTables([]*schemas.Table{authSourceSchema}, sb))
assert.Contains(t, sb.String(), `"Provider":"ConvertibleSourceName"`)
}