summaryrefslogtreecommitdiff
path: root/test/web/twitter_api
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-09-09 17:48:57 +0200
committerRoger Braun <roger@rogerbraun.net>2017-09-09 17:48:57 +0200
commit66e4c710d469d7f2177c06e0dafb181d4d4abf30 (patch)
tree38dd73db9163d61518016d8ebc790c3dfd92b1b8 /test/web/twitter_api
parent4dc517a0bb979793c1c2590d38efe853c68eb80c (diff)
downloadpleroma-66e4c710d469d7f2177c06e0dafb181d4d4abf30.tar.gz
pleroma-66e4c710d469d7f2177c06e0dafb181d4d4abf30.zip
Add reblogging to MastodonAPI.
Diffstat (limited to 'test/web/twitter_api')
-rw-r--r--test/web/twitter_api/twitter_api_controller_test.exs7
-rw-r--r--test/web/twitter_api/twitter_api_test.exs2
2 files changed, 1 insertions, 8 deletions
diff --git a/test/web/twitter_api/twitter_api_controller_test.exs b/test/web/twitter_api/twitter_api_controller_test.exs
index 89b8c2eeb..2c89509ff 100644
--- a/test/web/twitter_api/twitter_api_controller_test.exs
+++ b/test/web/twitter_api/twitter_api_controller_test.exs
@@ -354,13 +354,6 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do
request_path = "/api/statuses/retweet/#{note_activity.id}.json"
- user = Repo.get_by(User, ap_id: note_activity.data["actor"])
- response = conn
- |> with_credentials(user.nickname, "test")
- |> post(request_path)
- assert json_response(response, 400) == %{"error" => "You cannot repeat your own notice.",
- "request" => request_path}
-
response = conn
|> with_credentials(current_user.nickname, "test")
|> post(request_path)
diff --git a/test/web/twitter_api/twitter_api_test.exs b/test/web/twitter_api/twitter_api_test.exs
index bbb261eff..c1c9b2d22 100644
--- a/test/web/twitter_api/twitter_api_test.exs
+++ b/test/web/twitter_api/twitter_api_test.exs
@@ -290,7 +290,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
note_activity = insert(:note_activity)
activity_user = Repo.get_by!(User, ap_id: note_activity.data["actor"])
- {:ok, status} = TwitterAPI.retweet(user, note_activity)
+ {:ok, status} = TwitterAPI.repeat(user, note_activity.id)
updated_activity = Activity.get_by_ap_id(note_activity.data["id"])
assert status == ActivityRepresenter.to_map(updated_activity, %{user: activity_user, for: user})