aboutsummaryrefslogtreecommitdiff
path: root/test/web/twitter_api/views
diff options
context:
space:
mode:
authorlambda <pleromagit@rogerbraun.net>2019-01-09 16:26:38 +0000
committerlambda <pleromagit@rogerbraun.net>2019-01-09 16:26:38 +0000
commit1881680e28273035333a121e2135781f1ae3f15a (patch)
tree261953accd5210c4e5474c7ce23b443eafac6f5c /test/web/twitter_api/views
parent5c5c8508c203886f32b150e7d8c1f7362a4fde0e (diff)
parent8df348a3daaa9c5ac9693fd52b62594dfe9158be (diff)
downloadpleroma-1881680e28273035333a121e2135781f1ae3f15a.tar.gz
Merge branch 'scarlett/pleroma-summary-html-api' into 'develop'
Scarlett/pleroma summary html api See merge request pleroma/pleroma!647
Diffstat (limited to 'test/web/twitter_api/views')
-rw-r--r--test/web/twitter_api/views/activity_view_test.exs7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/web/twitter_api/views/activity_view_test.exs b/test/web/twitter_api/views/activity_view_test.exs
index bd4878e98..5294204c6 100644
--- a/test/web/twitter_api/views/activity_view_test.exs
+++ b/test/web/twitter_api/views/activity_view_test.exs
@@ -81,10 +81,13 @@ defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do
result = ActivityView.render("activity.json", activity: activity)
- expected =
+ expected = ":woollysocks: meow"
+
+ expected_html =
"<img height=\"32px\" width=\"32px\" alt=\"woollysocks\" title=\"woollysocks\" src=\"http://localhost:4001/finmoji/128px/woollysocks-128.png\" /> meow"
assert result["summary"] == expected
+ assert result["summary_html"] == expected_html
end
test "a create activity with a summary containing invalid HTML" do
@@ -99,6 +102,7 @@ defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do
expected = "meow"
assert result["summary"] == expected
+ assert result["summary_html"] == expected
end
test "a create activity with a note" do
@@ -134,6 +138,7 @@ defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do
"repeated" => false,
"statusnet_conversation_id" => convo_id,
"summary" => "",
+ "summary_html" => "",
"statusnet_html" =>
"Hey <span><a data-user=\"#{other_user.id}\" href=\"#{other_user.ap_id}\">@<span>shp</span></a></span>!",
"tags" => [],