From 7f4a0a1aeb8a294ee967c63d7a48446df013ec44 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Fri, 22 Mar 2024 14:03:46 +0100 Subject: [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 --- internal/processing/account/update_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'internal/processing/account/update_test.go') diff --git a/internal/processing/account/update_test.go b/internal/processing/account/update_test.go index 87b4ebd50..76ad3abe8 100644 --- a/internal/processing/account/update_test.go +++ b/internal/processing/account/update_test.go @@ -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()) } -- cgit v1.2.3