From 8df348a3daaa9c5ac9693fd52b62594dfe9158be Mon Sep 17 00:00:00 2001
From: lain
Date: Wed, 9 Jan 2019 17:18:37 +0100
Subject: [PATCH] Add test for summary_html
---
.../representers/activity_representer_test.exs | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/test/web/twitter_api/representers/activity_representer_test.exs b/test/web/twitter_api/representers/activity_representer_test.exs
index ab3e04985..d71aaacfe 100644
--- a/test/web/twitter_api/representers/activity_representer_test.exs
+++ b/test/web/twitter_api/representers/activity_representer_test.exs
@@ -107,7 +107,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenterTest do
"published" => date,
"type" => "Note",
"content" => content_html,
- "summary" => "2hu",
+ "summary" => "2hu :2hu:",
"inReplyToStatusId" => 213_123,
"attachment" => [
object
@@ -129,7 +129,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenterTest do
}
expected_html =
- "2hu
alert('YAY')Some content mentioning 2hu
alert('YAY')Some content mentioning @shp"
@@ -138,7 +138,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenterTest do
"user" => UserView.render("show.json", %{user: user, for: follower}),
"is_local" => false,
"statusnet_html" => expected_html,
- "text" => "2hu" <> content,
+ "text" => "2hu :2hu:" <> content,
"is_post_verb" => true,
"created_at" => "Tue May 24 13:26:08 +0000 2016",
"in_reply_to_status_id" => 213_123,
@@ -163,8 +163,9 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenterTest do
"possibly_sensitive" => true,
"uri" => activity.data["object"]["id"],
"visibility" => "direct",
- "summary" => "2hu",
- "summary_html" => "2hu"
+ "summary" => "2hu :2hu:",
+ "summary_html" =>
+ "2hu "
}
assert ActivityRepresenter.to_map(activity, %{
--
2.45.2