aboutsummaryrefslogtreecommitdiff
path: root/internal/db/lfs_test.go
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-04-18 12:07:30 +0800
committerGitHub <noreply@github.com>2020-04-18 12:07:30 +0800
commit9d64d222a8c30db5076a591981ad7cfe672ba6f1 (patch)
treec753eb898a1ead0afbe5b6a7a28b466ab0d2b8ac /internal/db/lfs_test.go
parentfa497b16332c24bc4d9e788c64bda94e3c1499a7 (diff)
db: add tests for users (#6116)
* Add new methods * Use Users.Create to replace previous hack * Reduce side effect * Do not clear tables when test failed * test_users_Authenticate * Rename constant * test_users_Create * test_users_GetByEmail * test_users_GetByID * test_users_GetByUsername
Diffstat (limited to 'internal/db/lfs_test.go')
-rw-r--r--internal/db/lfs_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/db/lfs_test.go b/internal/db/lfs_test.go
index 29c7d665..49d94406 100644
--- a/internal/db/lfs_test.go
+++ b/internal/db/lfs_test.go
@@ -37,7 +37,7 @@ func Test_lfs(t *testing.T) {
} {
t.Run(tc.name, func(t *testing.T) {
t.Cleanup(func() {
- err := clearTables(db.DB, tables...)
+ err := clearTables(t, db.DB, tables...)
if err != nil {
t.Fatal(err)
}