From 9c6abec4d8b2487edeb124aa197a5dd6d771e345 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Fri, 1 Mar 2019 15:48:04 +0300 Subject: [PATCH] use commonapi.post instead of activitybulder --- .../web/twitter_api/twitter_api_controller_test.exs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/web/twitter_api/twitter_api_controller_test.exs b/test/web/twitter_api/twitter_api_controller_test.exs index ed5683779..7125d85ab 100644 --- a/test/web/twitter_api/twitter_api_controller_test.exs +++ b/test/web/twitter_api/twitter_api_controller_test.exs @@ -427,10 +427,10 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do test "with credentials", %{conn: conn, user: current_user} do {:ok, activity} = - ActivityBuilder.insert( - %{"to" => [current_user.ap_id, "https://www.w3.org/ns/activitystreams#Public"]}, - %{user: current_user} - ) + CommonAPI.post(current_user, %{ + "status" => "why is tenshi eating a corndog so cute?", + "visibility" => "public" + }) conn = conn @@ -451,7 +451,10 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do test "does not show DMs in mentions timeline", %{conn: conn, user: current_user} do {:ok, _activity} = - ActivityBuilder.insert(%{"to" => [current_user.ap_id]}, %{user: current_user}) + CommonAPI.post(current_user, %{ + "status" => "Have you guys ever seen how cute tenshi eating a corndog is?", + "visibility" => "direct" + }) conn = conn -- 2.45.2