Merge branch 'develop' into oembed_provider
[akkoma] / test / web / twitter_api / views / activity_view_test.exs
index 3ab87d6fac11217507db9df07bd5e06fefb36915..77b8d99e798d03e8d378b041a81dd25b6fcb77b5 100644 (file)
@@ -37,6 +37,9 @@ defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do
       "id" => activity.id,
       "in_reply_to_status_id" => nil,
       "in_reply_to_screen_name" => nil,
+      "in_reply_to_user_id" => nil,
+      "in_reply_to_profileurl" => nil,
+      "in_reply_to_ostatus_uri" => nil,
       "is_local" => true,
       "is_post_verb" => true,
       "possibly_sensitive" => false,
@@ -44,7 +47,7 @@ defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do
       "repeated" => false,
       "statusnet_conversation_id" => convo_id,
       "statusnet_html" =>
-        "Hey <span><a href=\"#{other_user.ap_id}\">@<span>shp</span></a></span>!",
+        "Hey <span><a data-user=\"#{other_user.id}\" href=\"#{other_user.ap_id}\">@<span>shp</span></a></span>!",
       "tags" => [],
       "text" => "Hey @shp!",
       "uri" => activity.data["object"]["id"],
@@ -109,6 +112,7 @@ defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do
     {:ok, like, _object} = CommonAPI.favorite(activity.id, other_user)
 
     result = ActivityView.render("activity.json", activity: like)
+    activity = Pleroma.Activity.get_by_ap_id(activity.data["id"])
 
     expected = %{
       "activity_type" => "like",
@@ -118,6 +122,7 @@ defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do
       "in_reply_to_status_id" => activity.id,
       "is_local" => true,
       "is_post_verb" => false,
+      "favorited_status" => ActivityView.render("activity.json", activity: activity),
       "statusnet_html" => "shp favorited a status.",
       "text" => "shp favorited a status.",
       "uri" => "tag:#{like.data["id"]}:objectType=Favourite",
@@ -145,6 +150,7 @@ defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do
       "in_reply_to_status_id" => nil,
       "is_local" => true,
       "is_post_verb" => false,
+      "favorited_status" => nil,
       "statusnet_html" => "shp favorited a status.",
       "text" => "shp favorited a status.",
       "uri" => "tag:#{like.data["id"]}:objectType=Favourite",