This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
otter-space-sdk/pkg/models/source_test.go
SoXX 07b69f6c18
Some checks failed
Gitea Build Check / Build (push) Failing after 1m15s
test(postgres): fixed to use new ORM Generic
Signed-off-by: SoXX <soxx@fenpa.ws>
2024-06-25 15:00:44 +02:00

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)
}
})
}
}