X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fweb%2Ftwitter_api%2Frepresenters%2Factivity_representer_test.exs;h=2ac32aeb2243a8b1d9cb043ad29cdd841f666356;hb=3c08d229db423052d0dd88b8a36fb39b0ae81ead;hp=3f85e028ba87ff62f8bb8be6b9d7e5ebaf9370f4;hpb=38361e7b5e24cbbd4654bd76fce4b3c66562ab59;p=akkoma diff --git a/test/web/twitter_api/representers/activity_representer_test.exs b/test/web/twitter_api/representers/activity_representer_test.exs index 3f85e028b..2ac32aeb2 100644 --- a/test/web/twitter_api/representers/activity_representer_test.exs +++ b/test/web/twitter_api/representers/activity_representer_test.exs @@ -1,9 +1,12 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2018 Pleroma Authors +# SPDX-License-Identifier: AGPL-3.0-only + defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenterTest do use Pleroma.DataCase alias Pleroma.{User, Activity, Object} alias Pleroma.Web.TwitterAPI.Representers.{ActivityRepresenter, ObjectRepresenter} alias Pleroma.Web.ActivityPub.ActivityPub - alias Pleroma.Builders.UserBuilder alias Pleroma.Web.TwitterAPI.UserView import Pleroma.Factory @@ -58,7 +61,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenterTest do end test "an activity" do - {:ok, user} = UserBuilder.insert() + user = insert(:user) # {:ok, mentioned_user } = UserBuilder.insert(%{nickname: "shp", ap_id: "shp"}) mentioned_user = insert(:user, %{nickname: "shp"}) @@ -126,7 +129,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenterTest do } expected_html = - "

2hu

alert('YAY')Some 2hu content mentioning 2hu

alert('YAY')Some \"2hu\" content mentioning
@shp" @@ -139,6 +142,10 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenterTest do "is_post_verb" => true, "created_at" => "Tue May 24 13:26:08 +0000 2016", "in_reply_to_status_id" => 213_123, + "in_reply_to_screen_name" => nil, + "in_reply_to_user_id" => nil, + "in_reply_to_profileurl" => nil, + "in_reply_to_ostatus_uri" => nil, "statusnet_conversation_id" => convo_object.id, "attachments" => [ ObjectRepresenter.to_map(object)