diff options
author | Joe Chen <jc@unknwon.io> | 2023-05-14 20:15:47 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-14 20:15:47 -0400 |
commit | 0721ef2399c7c0e7f01ee96530b99f883434c623 (patch) | |
tree | 8ddb3e5002ab0b7402a6339c7781d91caebd96e7 /internal/db/backup_test.go | |
parent | 9ac93067f640ca228ff218de1686ff61e8747d05 (diff) |
refactor(db): migrate off `user_email.go` to `users.go` (#7452)
Diffstat (limited to 'internal/db/backup_test.go')
-rw-r--r-- | internal/db/backup_test.go | 18 |
1 files changed, 16 insertions, 2 deletions
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, |