otter-space-sdk/pkg/models/user_test.go
SoXX 85d7905e8a refactor: renamed variables
- Update model references from `UserFavorites` to `UserFavorite` in multiple files.
- Adjust database queries and struct definitions accordingly to maintain consistency.
2024-08-09 22:43:58 +02:00

35 lines
650 B
Go

package models
import "testing"
func TestUser_TableName(t *testing.T) {
type fields struct {
BaseModel BaseModel[UserID]
Favorites []UserFavorite
Sources []UserSource
}
tests := []struct {
name string
fields fields
want string
}{
{
name: "Test 1: Is name User",
fields: fields{},
want: "User",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
us := User{
BaseModel: tt.fields.BaseModel,
Favorites: tt.fields.Favorites,
Sources: tt.fields.Sources,
}
if got := us.TableName(); got != tt.want {
t.Errorf("TableName() = %v, want %v", got, tt.want)
}
})
}
}