otter-space-sdk/pkg/models/userSource_test.go

43 lines
1000 B
Go
Raw Normal View History

package models
import "testing"
func TestUserSource_TableName(t *testing.T) {
type fields struct {
User User
2024-08-09 20:14:56 +00:00
UserID UserID
Source Source
2024-08-09 20:14:56 +00:00
SourceID SourceID
ScrapeTimeInterval string
AccountUsername string
AccountID string
}
tests := []struct {
name string
fields fields
want string
}{
{
name: "Test 1: Is name UserSource",
fields: fields{},
want: "UserSource",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
us := UserSource{
User: tt.fields.User,
UserID: tt.fields.UserID,
Source: tt.fields.Source,
SourceID: tt.fields.SourceID,
ScrapeTimeInterval: tt.fields.ScrapeTimeInterval,
AccountUsername: tt.fields.AccountUsername,
AccountID: tt.fields.AccountID,
}
if got := us.TableName(); got != tt.want {
t.Errorf("TableName() = %v, want %v", got, tt.want)
}
})
}
}