test(postgres): fixed to use new ORM Generic
Some checks failed
Gitea Build Check / Build (push) Failing after 1m15s
Some checks failed
Gitea Build Check / Build (push) Failing after 1m15s
Signed-off-by: SoXX <soxx@fenpa.ws>
This commit is contained in:
parent
d8f338332b
commit
07b69f6c18
@ -1,9 +1,10 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
func TestBaseModel_BeforeCreate(t *testing.T) {
|
||||
@ -41,8 +42,8 @@ func TestBaseModel_BeforeCreate(t *testing.T) {
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
base := &BaseModel{
|
||||
ID: tt.fields.ID,
|
||||
base := &BaseModel[AnthrovePostID]{
|
||||
ID: AnthrovePostID(tt.fields.ID),
|
||||
CreatedAt: tt.fields.CreatedAt,
|
||||
UpdatedAt: tt.fields.UpdatedAt,
|
||||
DeletedAt: tt.fields.DeletedAt,
|
||||
|
@ -4,7 +4,7 @@ import "testing"
|
||||
|
||||
func TestPost_TableName(t *testing.T) {
|
||||
type fields struct {
|
||||
BaseModel BaseModel
|
||||
BaseModel BaseModel[AnthrovePostID]
|
||||
Rating Rating
|
||||
Tags []Tag
|
||||
Favorites []UserFavorites
|
||||
|
@ -4,7 +4,7 @@ import "testing"
|
||||
|
||||
func TestSource_TableName(t *testing.T) {
|
||||
type fields struct {
|
||||
BaseModel BaseModel
|
||||
BaseModel BaseModel[AnthroveSourceID]
|
||||
DisplayName string
|
||||
Domain string
|
||||
Icon string
|
||||
|
@ -4,7 +4,7 @@ import "testing"
|
||||
|
||||
func TestUser_TableName(t *testing.T) {
|
||||
type fields struct {
|
||||
BaseModel BaseModel
|
||||
BaseModel BaseModel[AnthroveUserID]
|
||||
Favorites []UserFavorites
|
||||
Sources []UserSource
|
||||
}
|
||||
|
Reference in New Issue
Block a user