fix tests

This commit is contained in:
Niko Abeler 2023-07-09 20:36:35 +02:00
parent f513205cc3
commit 34119d5642
2 changed files with 8 additions and 0 deletions

View File

@ -27,3 +27,7 @@ func (e *MockEntry) MetaData() interface{} {
func (e *MockEntry) SetMetaData(metaData interface{}) { func (e *MockEntry) SetMetaData(metaData interface{}) {
e.metaData = metaData.(*MockEntryMetaData) e.metaData = metaData.(*MockEntryMetaData)
} }
func (e *MockEntry) Title() string {
return ""
}

View File

@ -82,6 +82,10 @@ func (e *MockEntry) SetMetaData(metaData interface{}) {
e.metaData = *metaData.(*MockEntryMetaData) e.metaData = *metaData.(*MockEntryMetaData)
} }
func (e *MockEntry) Title() string {
return ""
}
func TestFieldToFormField(t *testing.T) { func TestFieldToFormField(t *testing.T) {
field := reflect.TypeOf(&MockEntryMetaData{}).Elem().Field(0) field := reflect.TypeOf(&MockEntryMetaData{}).Elem().Field(0)
formField, err := editor.FieldToFormField(field) formField, err := editor.FieldToFormField(field)