summaryrefslogtreecommitdiff
path: root/internal/processing/account/update_test.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-03-22 14:03:46 +0100
committerLibravatar GitHub <noreply@github.com>2024-03-22 14:03:46 +0100
commit7f4a0a1aeb8a294ee967c63d7a48446df013ec44 (patch)
treeb9b3836fa0abe1d7a5758d07d6ebb6486a353d56 /internal/processing/account/update_test.go
parent[bugfix] add all possible busy result codes to the sqlite errBusy catching ch... (diff)
downloadgotosocial-7f4a0a1aeb8a294ee967c63d7a48446df013ec44.tar.xz
[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
Diffstat (limited to 'internal/processing/account/update_test.go')
-rw-r--r--internal/processing/account/update_test.go10
1 files changed, 8 insertions, 2 deletions
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 := &gtsmodel.Account{}
*testAccount = *suite.testAccounts["local_account_1"]
+ // Copy zork's settings.
+ settings := &gtsmodel.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())
}