From 0721ef2399c7c0e7f01ee96530b99f883434c623 Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Sun, 14 May 2023 20:15:47 -0400 Subject: refactor(db): migrate off `user_email.go` to `users.go` (#7452) --- internal/db/backup_test.go | 18 ++++++++++++++++-- 1 file changed, 16 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 fc00ada8..4c5e4752 100644 --- a/internal/db/backup_test.go +++ b/internal/db/backup_test.go @@ -31,8 +31,9 @@ func TestDumpAndImport(t *testing.T) { } t.Parallel() - 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)) + const wantTables = 7 + if len(Tables) != wantTables { + t.Fatalf("New table has added (want %d got %d), please add new tests for the table and update this check", wantTables, len(Tables)) } db := dbtest.NewDB(t, "dumpAndImport", Tables...) @@ -131,6 +132,19 @@ func setupDBToDump(t *testing.T, db *gorm.DB) { CreatedUnix: 1588568886, }, + &EmailAddress{ + ID: 1, + UserID: 1, + Email: "alice@example.com", + IsActivated: false, + }, + &EmailAddress{ + ID: 2, + UserID: 2, + Email: "bob@example.com", + IsActivated: true, + }, + &Follow{ ID: 1, UserID: 1, -- cgit v1.2.3