From b1fefcbe5011a4a792808faaf26fae6881ecc1b0 Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Sun, 23 Oct 2022 16:17:53 +0800 Subject: refactor(db): migrate `Follow` off `user.go` (#7203) --- internal/db/backup_test.go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'internal/db/backup_test.go') 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", -- cgit v1.2.3