use commonapi.post instead of activitybulder
authorrinpatch <rinpatch@sdf.org>
Fri, 1 Mar 2019 12:48:04 +0000 (15:48 +0300)
committerrinpatch <rinpatch@sdf.org>
Fri, 1 Mar 2019 12:48:04 +0000 (15:48 +0300)
test/web/twitter_api/twitter_api_controller_test.exs

index ed56837798a509b61dad986f9f24ed1cf7d5c86e..7125d85ab2b7931c13c598e0163a31e1cdc11c96 100644 (file)
@@ -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