mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore] Move local account settings to separate db table (#2770)
* [chore] Move local account settings to separate database model * don't use separate settings_id
This commit is contained in:
@ -126,9 +126,15 @@ func (suite *AccountUpdateTestSuite) TestAccountUpdateWithMention() {
|
||||
}
|
||||
|
||||
func (suite *AccountUpdateTestSuite) TestAccountUpdateWithMarkdownNote() {
|
||||
// Copy zork.
|
||||
testAccount := >smodel.Account{}
|
||||
*testAccount = *suite.testAccounts["local_account_1"]
|
||||
|
||||
// Copy zork's settings.
|
||||
settings := >smodel.AccountSettings{}
|
||||
*settings = *suite.testAccounts["local_account_1"].Settings
|
||||
testAccount.Settings = settings
|
||||
|
||||
var (
|
||||
ctx = context.Background()
|
||||
note = "*hello* ~~here~~ i am!"
|
||||
@ -136,8 +142,8 @@ func (suite *AccountUpdateTestSuite) TestAccountUpdateWithMarkdownNote() {
|
||||
)
|
||||
|
||||
// Set status content type of account 1 to markdown for this test.
|
||||
testAccount.StatusContentType = "text/markdown"
|
||||
if err := suite.db.UpdateAccount(ctx, testAccount, "status_content_type"); err != nil {
|
||||
testAccount.Settings.StatusContentType = "text/markdown"
|
||||
if err := suite.db.UpdateAccountSettings(ctx, testAccount.Settings, "status_content_type"); err != nil {
|
||||
suite.FailNow(err.Error())
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user