diff options
author | Joe Chen <jc@unknwon.io> | 2023-08-23 00:15:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-23 00:15:30 -0400 |
commit | 069f1ed9a4651dd2598a513d94278a400a04e5a7 (patch) | |
tree | 4e2455a2aab10daba29985bffe15183ab09bb5d8 /internal/db/backup_test.go | |
parent | 1112a71ea5279a29666d54f07ef101480519fd16 (diff) |
db: migrate `admin.go` to `notices.go` with GORM (#7536)
Diffstat (limited to 'internal/db/backup_test.go')
-rw-r--r-- | internal/db/backup_test.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/internal/db/backup_test.go b/internal/db/backup_test.go index 4c5e4752..9d2d9403 100644 --- a/internal/db/backup_test.go +++ b/internal/db/backup_test.go @@ -31,7 +31,7 @@ func TestDumpAndImport(t *testing.T) { } t.Parallel() - const wantTables = 7 + const wantTables = 8 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)) } @@ -190,6 +190,13 @@ func setupDBToDump(t *testing.T, db *gorm.DB) { }), CreatedUnix: 1588568886, }, + + &Notice{ + ID: 1, + Type: NoticeTypeRepository, + Description: "This is a notice", + CreatedUnix: 1588568886, + }, } for _, val := range vals { err := db.Create(val).Error |