X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fpleroma%2Fweb%2Fcommon_api_test.exs;h=20870bdd70ed87b813ea25ba3b4a522fc18d5718;hb=829ae13572d051e965dfa9aedeb64753481b5f2b;hp=4a10a5bc488e651ffbe2b1deb683f5fb9e62a02d;hpb=3ca39ccf69658d095a91e8a61030ecee98b279d8;p=akkoma diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs index 4a10a5bc4..20870bdd7 100644 --- a/test/pleroma/web/common_api_test.exs +++ b/test/pleroma/web/common_api_test.exs @@ -209,9 +209,7 @@ defmodule Pleroma.Web.CommonAPITest do object = Object.normalize(activity, fetch: false) assert object.data["content"] == - "https://example.org is the site of @#{other_user.nickname} #2hu" + "https://example.org is the site of @#{other_user.nickname} #2hu" end test "it posts a chat message" do @@ -588,7 +586,11 @@ defmodule Pleroma.Web.CommonAPITest do object = Object.normalize(activity, fetch: false) assert object.data["content"] == "

2hu

alert('xss')" - assert object.data["source"] == post + + assert object.data["source"] == %{ + "mediaType" => "text/html", + "content" => post + } end test "it filters out obviously bad tags when accepting a post as Markdown" do @@ -605,7 +607,11 @@ defmodule Pleroma.Web.CommonAPITest do object = Object.normalize(activity, fetch: false) assert object.data["content"] == "

2hu

" - assert object.data["source"] == post + + assert object.data["source"] == %{ + "mediaType" => "text/markdown", + "content" => post + } end test "it does not allow replies to direct messages that are not direct messages themselves" do