mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-05 13:08:07 -06:00
[bugfix] Fix Postgres emoji delete, emoji category change (#2570)
* [bugfix] Fix Postgres emoji delete, emoji category change * revert trace logging * caching issue * update tests
This commit is contained in:
parent
14b684b2b5
commit
aa8bbe6ad2
15 changed files with 500 additions and 233 deletions
|
|
@ -23,6 +23,7 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/suite"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/db"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
|
||||
"github.com/superseriousbusiness/gotosocial/testrig"
|
||||
)
|
||||
|
||||
|
|
@ -160,6 +161,16 @@ func (suite *EmojiTestSuite) TestGetEmojiCategory() {
|
|||
suite.NotNil(category)
|
||||
}
|
||||
|
||||
func (suite *EmojiTestSuite) TestUpdateEmojiCategory() {
|
||||
testEmoji := new(gtsmodel.Emoji)
|
||||
*testEmoji = *suite.testEmojis["rainbow"]
|
||||
|
||||
testEmoji.CategoryID = ""
|
||||
|
||||
err := suite.db.UpdateEmoji(context.Background(), testEmoji, "category_id")
|
||||
suite.NoError(err)
|
||||
}
|
||||
|
||||
func TestEmojiTestSuite(t *testing.T) {
|
||||
suite.Run(t, new(EmojiTestSuite))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue