summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/mastodon_api_controller_test.exs
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-08-31 10:20:34 +0300
committerrinpatch <rinpatch@sdf.org>2019-08-31 10:20:34 +0300
commit90c2dae9a4d5fd7e7c1f0d0f532ce95fbc4c69f9 (patch)
treec1e25d61835944b3b8e8a2329ae1de00c19afc71 /test/web/mastodon_api/mastodon_api_controller_test.exs
parenteb1739c59699754297149c92ea3d03ec688ae16a (diff)
downloadpleroma-90c2dae9a4d5fd7e7c1f0d0f532ce95fbc4c69f9.tar.gz
pleroma-90c2dae9a4d5fd7e7c1f0d0f532ce95fbc4c69f9.zip
Remove most of Pleroma.Web.TwitterAPI.TwitterAPI
Diffstat (limited to 'test/web/mastodon_api/mastodon_api_controller_test.exs')
-rw-r--r--test/web/mastodon_api/mastodon_api_controller_test.exs8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs
index 6fcdc19aa..66588c891 100644
--- a/test/web/mastodon_api/mastodon_api_controller_test.exs
+++ b/test/web/mastodon_api/mastodon_api_controller_test.exs
@@ -21,7 +21,6 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
alias Pleroma.Web.OAuth.Token
alias Pleroma.Web.OStatus
alias Pleroma.Web.Push
- alias Pleroma.Web.TwitterAPI.TwitterAPI
import Pleroma.Factory
import ExUnit.CaptureLog
import Tesla.Mock
@@ -1583,12 +1582,9 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
filename: "an_image.jpg"
}
- media =
- TwitterAPI.upload(file, user, "json")
- |> Jason.decode!()
+ {:ok, %{id: media_id}} = ActivityPub.upload(file, actor: user.ap_id)
- {:ok, image_post} =
- CommonAPI.post(user, %{"status" => "cofe", "media_ids" => [media["media_id"]]})
+ {:ok, image_post} = CommonAPI.post(user, %{"status" => "cofe", "media_ids" => [media_id]})
conn =
conn