SoXX
07b69f6c18
Some checks failed
Gitea Build Check / Build (push) Failing after 1m15s
Signed-off-by: SoXX <soxx@fenpa.ws>
41 lines
857 B
Go
41 lines
857 B
Go
package models
|
|
|
|
import "testing"
|
|
|
|
func TestSource_TableName(t *testing.T) {
|
|
type fields struct {
|
|
BaseModel BaseModel[AnthroveSourceID]
|
|
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)
|
|
}
|
|
})
|
|
}
|
|
}
|