summaryrefslogtreecommitdiff
path: root/internal/ap/extractcontent_test.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-11-21 15:13:30 +0100
committerLibravatar GitHub <noreply@github.com>2023-11-21 15:13:30 +0100
commitcfefbc08d822cd85787d95dc2ee253e3368826d8 (patch)
treeaf6d6257dddca1645ab5f8e34a1c79ac80d82e0e /internal/ap/extractcontent_test.go
parent[docs] Annotate split-domain setup (#2372) (diff)
downloadgotosocial-cfefbc08d822cd85787d95dc2ee253e3368826d8.tar.xz
[feature] Federate status language in and out (#2366)
* [feature] Federate status language in + out * go fmt * tests, little fix * improve comments * unnest a bit * avoid unnecessary nil check * use more descriptive variable for contentMap * prefer instance languages when selecting from contentMap * update docs to reflect lang selection * rename rdfLangString -> rdfLangs * update comments to mention Pollable * iter through slice instead of map
Diffstat (limited to 'internal/ap/extractcontent_test.go')
-rw-r--r--internal/ap/extractcontent_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/ap/extractcontent_test.go b/internal/ap/extractcontent_test.go
index 590d1b931..c899a10e1 100644
--- a/internal/ap/extractcontent_test.go
+++ b/internal/ap/extractcontent_test.go
@@ -30,10 +30,11 @@ type ExtractContentTestSuite struct {
func (suite *ExtractContentTestSuite) TestExtractContent1() {
note := suite.noteWithMentions1
-
content := ap.ExtractContent(note)
- suite.Equal("hey @f0x and @dumpsterqueer", content)
+ suite.Equal("hey @f0x and @dumpsterqueer", content.Content)
+ suite.Equal("bonjour @f0x et @dumpsterqueer", content.ContentMap["fr"])
+ suite.Equal("hey @f0x and @dumpsterqueer", content.ContentMap["en"])
}
func TestExtractContentTestSuite(t *testing.T) {