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