mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-30 19:02:24 -05:00 
			
		
		
		
	fix emojis not showing in spoiler text (#878)
This commit is contained in:
		
					parent
					
						
							
								651303d970
							
						
					
				
			
			
				commit
				
					
						196e474e43
					
				
			
		
					 2 changed files with 36 additions and 1 deletions
				
			
		|  | @ -139,6 +139,41 @@ func (suite *StatusCreateTestSuite) TestProcessStatusMarkdownWithUnderscoreEmoji | |||
| 	suite.NotEmpty(apiStatus.Emojis) | ||||
| } | ||||
| 
 | ||||
| func (suite *StatusCreateTestSuite) TestProcessStatusMarkdownWithSpoilerTextEmoji() { | ||||
| 	ctx := context.Background() | ||||
| 	creatingAccount := suite.testAccounts["local_account_1"] | ||||
| 	creatingApplication := suite.testApplications["application_1"] | ||||
| 
 | ||||
| 	statusCreateForm := &model.AdvancedStatusCreateForm{ | ||||
| 		StatusCreateRequest: model.StatusCreateRequest{ | ||||
| 			Status:      "poopoo peepee", | ||||
| 			SpoilerText: "testing something :rainbow:", | ||||
| 			MediaIDs:    []string{}, | ||||
| 			Poll:        nil, | ||||
| 			InReplyToID: "", | ||||
| 			Sensitive:   false, | ||||
| 			Visibility:  model.VisibilityPublic, | ||||
| 			ScheduledAt: "", | ||||
| 			Language:    "en", | ||||
| 			Format:      model.StatusFormatMarkdown, | ||||
| 		}, | ||||
| 		AdvancedVisibilityFlagsForm: model.AdvancedVisibilityFlagsForm{ | ||||
| 			Federated: nil, | ||||
| 			Boostable: nil, | ||||
| 			Replyable: nil, | ||||
| 			Likeable:  nil, | ||||
| 		}, | ||||
| 	} | ||||
| 
 | ||||
| 	apiStatus, err := suite.status.Create(ctx, creatingAccount, creatingApplication, statusCreateForm) | ||||
| 	suite.NoError(err) | ||||
| 	suite.NotNil(apiStatus) | ||||
| 
 | ||||
| 	suite.Equal("<p>poopoo peepee</p>", apiStatus.Content) | ||||
| 	suite.Equal("testing something :rainbow:", apiStatus.SpoilerText) | ||||
| 	suite.NotEmpty(apiStatus.Emojis) | ||||
| } | ||||
| 
 | ||||
| func TestStatusCreateTestSuite(t *testing.T) { | ||||
| 	suite.Run(t, new(StatusCreateTestSuite)) | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue