diff options
author | Roger Braun <roger@rogerbraun.net> | 2017-04-15 13:54:46 +0200 |
---|---|---|
committer | Roger Braun <roger@rogerbraun.net> | 2017-04-15 13:54:46 +0200 |
commit | 60c60de330fe8fe03594da89831351099c8c9037 (patch) | |
tree | 8f5e0c83f8e0045eb73e2d991f5e1ae16d99dbd9 /test/web/twitter_api/twitter_api_test.exs | |
parent | 21c397820f5feffc5d68ccfb578e2d6765052a3b (diff) | |
download | pleroma-60c60de330fe8fe03594da89831351099c8c9037.tar.gz pleroma-60c60de330fe8fe03594da89831351099c8c9037.zip |
Add announcements / retweets to TwAPI.
Diffstat (limited to 'test/web/twitter_api/twitter_api_test.exs')
-rw-r--r-- | test/web/twitter_api/twitter_api_test.exs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/web/twitter_api/twitter_api_test.exs b/test/web/twitter_api/twitter_api_test.exs index fd9908b9f..71b0d8b12 100644 --- a/test/web/twitter_api/twitter_api_test.exs +++ b/test/web/twitter_api/twitter_api_test.exs @@ -209,6 +209,17 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do assert status["fave_num"] == 0 end + test "it retweets a status and returns the retweet" do + user = insert(:user) + note_activity = insert(:note_activity) + activity_user = Repo.get_by!(User, ap_id: note_activity.data["actor"]) + + {:ok, status} = TwitterAPI.retweet(user, note_activity) + updated_activity = Activity.get_by_ap_id(note_activity.data["id"]) + + assert status == ActivityRepresenter.to_map(updated_activity, %{user: activity_user, for: user}) + end + setup do Supervisor.terminate_child(Pleroma.Supervisor, ConCache) Supervisor.restart_child(Pleroma.Supervisor, ConCache) |