diff options
author | rinpatch <rinpatch@sdf.org> | 2017-01-01 03:10:08 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2017-01-01 03:10:08 +0300 |
commit | 4a6855d9eedf07159520b2205c554c891e70c7d4 (patch) | |
tree | 1c4e2f4297845f3fc766fa1356928a99de933634 /test | |
parent | 4977e96fa408e8148a355b3c759af34ae3ca312d (diff) | |
download | pleroma-4a6855d9eedf07159520b2205c554c891e70c7d4.tar.gz |
Provide plaintext representations of content/cw in MastoAPI
Diffstat (limited to 'test')
-rw-r--r-- | test/web/mastodon_api/status_view_test.exs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/web/mastodon_api/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs index 8db92ac16..db2fdc2f6 100644 --- a/test/web/mastodon_api/status_view_test.exs +++ b/test/web/mastodon_api/status_view_test.exs @@ -101,7 +101,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do muted: false, pinned: false, sensitive: false, - spoiler_text: note.data["object"]["summary"], + spoiler_text: HtmlSanitizeEx.basic_html(note.data["object"]["summary"]), visibility: "public", media_attachments: [], mentions: [], @@ -126,7 +126,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do ], pleroma: %{ local: true, - conversation_id: convo_id + conversation_id: convo_id, + content: %{"text/plain" => HtmlSanitizeEx.strip_tags(note.data["object"]["content"])}, + spoiler_text: %{"text/plain" => HtmlSanitizeEx.strip_tags(note.data["object"]["summary"])} } } |