mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-30 15:32:25 -05: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:
parent
0767647056
commit
7f4a0a1aeb
36 changed files with 525 additions and 191 deletions
|
|
@ -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())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue