soxx
2a752adcac
All checks were successful
Gitea Build Check / Build (push) Successful in 10m49s
Signed-off-by: soxx <soxx@fenpa.ws>
38 lines
672 B
Go
38 lines
672 B
Go
package models
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestUserFavorite_TableName(t *testing.T) {
|
|
type fields struct {
|
|
UserID string
|
|
PostID string
|
|
CreatedAt time.Time
|
|
}
|
|
tests := []struct {
|
|
name string
|
|
fields fields
|
|
want string
|
|
}{
|
|
{
|
|
name: "Test 1: Is name UserFavorites",
|
|
fields: fields{},
|
|
want: "UserFavorites",
|
|
},
|
|
}
|
|
for _, tt := range tests {
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
us := UserFavorites{
|
|
UserID: tt.fields.UserID,
|
|
PostID: tt.fields.PostID,
|
|
CreatedAt: tt.fields.CreatedAt,
|
|
}
|
|
if got := us.TableName(); got != tt.want {
|
|
t.Errorf("TableName() = %v, want %v", got, tt.want)
|
|
}
|
|
})
|
|
}
|
|
}
|