[feature] Allow import of following and blocks via CSV (#3150)

* [feature] Import follows + blocks via settings panel

* test import follows
This commit is contained in:
tobi
2024-08-02 13:41:46 +02:00
committed by GitHub
parent 697261da53
commit 7b5917d6ae
25 changed files with 1247 additions and 50 deletions

View File

@ -37,7 +37,12 @@ type InstancePatchTestSuite struct {
}
func (suite *InstancePatchTestSuite) instancePatch(fieldName string, fileName string, extraFields map[string][]string) (code int, body []byte) {
requestBody, w, err := testrig.CreateMultipartFormData(fieldName, fileName, extraFields)
var dataF testrig.DataF
if fieldName != "" && fileName != "" {
dataF = testrig.FileToDataF(fieldName, fileName)
}
requestBody, w, err := testrig.CreateMultipartFormData(dataF, extraFields)
if err != nil {
suite.FailNow(err.Error())
}
@ -499,7 +504,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch4() {
func (suite *InstancePatchTestSuite) TestInstancePatch5() {
requestBody, w, err := testrig.CreateMultipartFormData(
"", "",
nil,
map[string][]string{
"short_description": {"<p>This is some html, which is <em>allowed</em> in short descriptions.</p>"},
})