aboutsummaryrefslogtreecommitdiff
path: root/internal/db/backup_test.go
diff options
context:
space:
mode:
authorJoe Chen <jc@unknwon.io>2022-10-23 16:17:53 +0800
committerGitHub <noreply@github.com>2022-10-23 16:17:53 +0800
commitb1fefcbe5011a4a792808faaf26fae6881ecc1b0 (patch)
tree42c3d2922ea8460f6f5bf1ebb314039275c25ec2 /internal/db/backup_test.go
parent8077360cf6370c9ddb026f2432ceb4f4f4ac31c4 (diff)
refactor(db): migrate `Follow` off `user.go` (#7203)
Diffstat (limited to 'internal/db/backup_test.go')
-rw-r--r--internal/db/backup_test.go15
1 files changed, 13 insertions, 2 deletions
diff --git a/internal/db/backup_test.go b/internal/db/backup_test.go
index b79d455c..52ce9aaa 100644
--- a/internal/db/backup_test.go
+++ b/internal/db/backup_test.go
@@ -31,8 +31,8 @@ func TestDumpAndImport(t *testing.T) {
}
t.Parallel()
- if len(Tables) != 5 {
- t.Fatalf("New table has added (want 5 got %d), please add new tests for the table and update this check", len(Tables))
+ if len(Tables) != 6 {
+ t.Fatalf("New table has added (want 6 got %d), please add new tests for the table and update this check", len(Tables))
}
db := dbtest.NewDB(t, "dumpAndImport", Tables...)
@@ -131,6 +131,17 @@ func setupDBToDump(t *testing.T, db *gorm.DB) {
CreatedUnix: 1588568886,
},
+ &Follow{
+ ID: 1,
+ UserID: 1,
+ FollowID: 2,
+ },
+ &Follow{
+ ID: 2,
+ UserID: 2,
+ FollowID: 1,
+ },
+
&LFSObject{
RepoID: 1,
OID: "ef797c8118f02dfb649607dd5d3f8c7623048c9c063d532cc95c5ed7a898a64f",