diff options
author | lain <lain@soykaf.club> | 2018-05-13 11:59:35 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2018-05-13 11:59:35 +0200 |
commit | a5c9dd0a2aa792ed075c6ff83b1de262a1529026 (patch) | |
tree | cde89f940be50a6ad13d3acc0a0c15d237ca7d96 /test/web/mastodon_api/mastodon_api_controller_test.exs | |
parent | 3c3933e40bce7001b5025bf2e05412dd9c128f0f (diff) | |
parent | aeff2d647483d5348cc1da5c901ce55f1c02b733 (diff) | |
download | pleroma-a5c9dd0a2aa792ed075c6ff83b1de262a1529026.tar.gz pleroma-a5c9dd0a2aa792ed075c6ff83b1de262a1529026.zip |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into develop
Diffstat (limited to 'test/web/mastodon_api/mastodon_api_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index 883ebc61e..882c92682 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -298,6 +298,24 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do end end + describe "unreblogging" do + test "unreblogs and returns the unreblogged status", %{conn: conn} do + activity = insert(:note_activity) + user = insert(:user) + + {:ok, _, _} = CommonAPI.repeat(activity.id, user) + + conn = + conn + |> assign(:user, user) + |> post("/api/v1/statuses/#{activity.id}/unreblog") + + assert %{"id" => id, "reblogged" => false, "reblogs_count" => 0} = json_response(conn, 200) + + assert to_string(activity.id) == id + end + end + describe "favoriting" do test "favs a status and returns it", %{conn: conn} do activity = insert(:note_activity) |