aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2018-11-25 21:16:44 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2018-12-04 04:52:09 +0000
commite8570758f90f0ef040eab011d0584c59379ba743 (patch)
tree65ebefbda7c7fd7cc012f57f87b952668653f53b /test
parent6f5f589f73da05ee09eef61b6a76a2ef611efa7c (diff)
downloadpleroma-e8570758f90f0ef040eab011d0584c59379ba743.tar.gz
twitterapi: fix remaining test failures
Diffstat (limited to 'test')
-rw-r--r--test/web/twitter_api/representers/activity_representer_test.exs41
1 files changed, 22 insertions, 19 deletions
diff --git a/test/web/twitter_api/representers/activity_representer_test.exs b/test/web/twitter_api/representers/activity_representer_test.exs
index 7cae4e4a1..314f2b51f 100644
--- a/test/web/twitter_api/representers/activity_representer_test.exs
+++ b/test/web/twitter_api/representers/activity_representer_test.exs
@@ -87,6 +87,26 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenterTest do
{:ok, convo_object} = Object.context_mapping("2hu") |> Repo.insert()
+ note_object = %{
+ "id" => "https://example.com/id/1",
+ "published" => date,
+ "type" => "Note",
+ "content" => content_html,
+ "summary" => "2hu",
+ "inReplyToStatusId" => 213_123,
+ "attachment" => [object.data],
+ "external_url" => "some url",
+ "like_count" => 5,
+ "announcement_count" => 3,
+ "context" => "2hu",
+ "tag" => ["content", "mentioning", "nsfw"],
+ "emoji" => %{
+ "2hu" => "corndog.png"
+ }
+ }
+
+ Object.create(note_object)
+
to = [
User.ap_followers(user),
"https://www.w3.org/ns/activitystreams#Public",
@@ -100,24 +120,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenterTest do
"id" => "id",
"to" => to,
"actor" => User.ap_id(user),
- "object" => %{
- "published" => date,
- "type" => "Note",
- "content" => content_html,
- "summary" => "2hu",
- "inReplyToStatusId" => 213_123,
- "attachment" => [
- object
- ],
- "external_url" => "some url",
- "like_count" => 5,
- "announcement_count" => 3,
- "context" => "2hu",
- "tag" => ["content", "mentioning", "nsfw"],
- "emoji" => %{
- "2hu" => "corndog.png"
- }
- },
+ "object" => note_object["id"],
"published" => date,
"context" => "2hu"
},
@@ -158,7 +161,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenterTest do
"tags" => ["nsfw", "content", "mentioning"],
"activity_type" => "post",
"possibly_sensitive" => true,
- "uri" => activity.data["object"]["id"],
+ "uri" => note_object["id"],
"visibility" => "direct",
"summary" => "2hu"
}