mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-30 10:42:25 -05:00
[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:
parent
697261da53
commit
7b5917d6ae
25 changed files with 1247 additions and 50 deletions
|
|
@ -38,7 +38,7 @@ type EmojiCreateTestSuite struct {
|
|||
func (suite *EmojiCreateTestSuite) TestEmojiCreateNewCategory() {
|
||||
// set up the request
|
||||
requestBody, w, err := testrig.CreateMultipartFormData(
|
||||
"image", "../../../../testrig/media/rainbow-original.png",
|
||||
testrig.FileToDataF("image", "../../../../testrig/media/rainbow-original.png"),
|
||||
map[string][]string{
|
||||
"shortcode": {"new_emoji"},
|
||||
"category": {"Test Emojis"}, // this category doesn't exist yet
|
||||
|
|
@ -111,7 +111,7 @@ func (suite *EmojiCreateTestSuite) TestEmojiCreateNewCategory() {
|
|||
func (suite *EmojiCreateTestSuite) TestEmojiCreateExistingCategory() {
|
||||
// set up the request
|
||||
requestBody, w, err := testrig.CreateMultipartFormData(
|
||||
"image", "../../../../testrig/media/rainbow-original.png",
|
||||
testrig.FileToDataF("image", "../../../../testrig/media/rainbow-original.png"),
|
||||
map[string][]string{
|
||||
"shortcode": {"new_emoji"},
|
||||
"category": {"cute stuff"}, // this category already exists
|
||||
|
|
@ -184,7 +184,7 @@ func (suite *EmojiCreateTestSuite) TestEmojiCreateExistingCategory() {
|
|||
func (suite *EmojiCreateTestSuite) TestEmojiCreateNoCategory() {
|
||||
// set up the request
|
||||
requestBody, w, err := testrig.CreateMultipartFormData(
|
||||
"image", "../../../../testrig/media/rainbow-original.png",
|
||||
testrig.FileToDataF("image", "../../../../testrig/media/rainbow-original.png"),
|
||||
map[string][]string{
|
||||
"shortcode": {"new_emoji"},
|
||||
"category": {""},
|
||||
|
|
@ -257,7 +257,7 @@ func (suite *EmojiCreateTestSuite) TestEmojiCreateNoCategory() {
|
|||
func (suite *EmojiCreateTestSuite) TestEmojiCreateAlreadyExists() {
|
||||
// set up the request -- use a shortcode that already exists for an emoji in the database
|
||||
requestBody, w, err := testrig.CreateMultipartFormData(
|
||||
"image", "../../../../testrig/media/rainbow-original.png",
|
||||
testrig.FileToDataF("image", "../../../../testrig/media/rainbow-original.png"),
|
||||
map[string][]string{
|
||||
"shortcode": {"rainbow"},
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue