SoXX
0e6a8fd61e
added more columns BREAKING-CHANGE: breaks database compatibility to older SDK versions
41 lines
849 B
Go
41 lines
849 B
Go
package models
|
|
|
|
import "testing"
|
|
|
|
func TestSource_TableName(t *testing.T) {
|
|
type fields struct {
|
|
BaseModel BaseModel[SourceID]
|
|
DisplayName string
|
|
Domain string
|
|
Icon string
|
|
UserSources []UserSource
|
|
References []PostReference
|
|
}
|
|
tests := []struct {
|
|
name string
|
|
fields fields
|
|
want string
|
|
}{
|
|
{
|
|
name: "Test 1: Is name Source",
|
|
fields: fields{},
|
|
want: "Source",
|
|
},
|
|
}
|
|
for _, tt := range tests {
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
so := Source{
|
|
BaseModel: tt.fields.BaseModel,
|
|
DisplayName: tt.fields.DisplayName,
|
|
Domain: tt.fields.Domain,
|
|
Icon: tt.fields.Icon,
|
|
UserSources: tt.fields.UserSources,
|
|
References: tt.fields.References,
|
|
}
|
|
if got := so.TableName(); got != tt.want {
|
|
t.Errorf("TableName() = %v, want %v", got, tt.want)
|
|
}
|
|
})
|
|
}
|
|
}
|