mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-24 02:43:32 -06:00
[bugfix] Avoid accidentally marking changed emojis as orphaned + pruning them (#1188)
* add predictable instance account to tests, use it in emoji urls + paths * use static image url to select emojis when pruning orphaned
This commit is contained in:
parent
a1dda22672
commit
927117d8e3
10 changed files with 81 additions and 29 deletions
|
|
@ -51,7 +51,7 @@ func (suite *EmojiTestSuite) TestDeleteEmojiByID() {
|
|||
}
|
||||
|
||||
func (suite *EmojiTestSuite) TestGetEmojiByStaticURL() {
|
||||
emoji, err := suite.db.GetEmojiByStaticURL(context.Background(), "http://localhost:8080/fileserver/01F8MH17FWEB39HZJ76B6VXSKF/emoji/static/01F8MH9H8E4VG3KDYJR9EGPXCQ.png")
|
||||
emoji, err := suite.db.GetEmojiByStaticURL(context.Background(), "http://localhost:8080/fileserver/01AY6P665V14JJR0AFVRT7311Y/emoji/static/01F8MH9H8E4VG3KDYJR9EGPXCQ.png")
|
||||
suite.NoError(err)
|
||||
suite.NotNil(emoji)
|
||||
suite.Equal("rainbow", emoji.Shortcode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue