fix test for _content_type
ci/woodpecker/push/release Pipeline was successful Details
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/release Pipeline was successful Details
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/test Pipeline failed Details
ci/woodpecker/pr/test Pipeline was successful Details

This commit is contained in:
FloatingGhost 2022-07-11 12:33:31 +01:00
parent b4fde9ebab
commit 1917d904b8
2 changed files with 5 additions and 3 deletions

View File

@ -5,7 +5,7 @@
"summary": null,
"content": "this gets replaced",
"source": {
"content": "@akkoma_user @remote_user linkifylink #dancedance $[jelly mfm goes here] \n\n## aaa",
"content": "@akkoma_user @remote_user @oops_not_a_mention linkifylink #dancedance $[jelly mfm goes here] \n\n## aaa",
"mediaType": "text/x.misskeymarkdown"
},
"published": "2022-07-10T15:37:36.368Z",

View File

@ -93,7 +93,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.ArticleNotePageValidatorTest
content: content,
source: %{
"content" =>
"@akkoma_user @remote_user linkifylink #dancedance $[jelly mfm goes here] \n\n## aaa",
"@akkoma_user @remote_user @oops_not_a_mention linkifylink #dancedance $[jelly mfm goes here] \n\n## aaa",
"mediaType" => "text/x.misskeymarkdown"
}
}
@ -105,11 +105,13 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.ArticleNotePageValidatorTest
assert content =~
"<span class=\"h-card\"><a class=\"u-url mention\" data-user=\"#{remote_user.id}\" href=\"#{remote_user.ap_id}\" rel=\"ugc\">@<span>remote_user</span></a></span>"
assert content =~ "@oops_not_a_mention"
assert content =~ "$[jelly mfm goes here] <br><br>## aaa"
end
test "a misskey MFM status with a _misskey_content field should work and be linked", _ do
local_user = insert(:user, %{nickname: "akkoma_user"})
local_user =
insert(:user, %{nickname: "akkoma_user", ap_id: "http://localhost:4001/users/akkoma_user"})
insert(:user, %{ap_id: "https://misskey.local.live/users/92hzkskwgy"})