diff options
author | lambda <pleromagit@rogerbraun.net> | 2018-05-13 09:32:29 +0000 |
---|---|---|
committer | lambda <pleromagit@rogerbraun.net> | 2018-05-13 09:32:29 +0000 |
commit | aeff2d647483d5348cc1da5c901ce55f1c02b733 (patch) | |
tree | 7b7db3e9a7e90771fc6f0283605ac390f2bddb45 /test/web/mastodon_api/mastodon_api_controller_test.exs | |
parent | 7e9f14bf3ca95fda9042e10b44b80d8441fa3c42 (diff) | |
parent | 54ccbd8479a77f613e8efd9568b3611c28d21742 (diff) | |
download | pleroma-aeff2d647483d5348cc1da5c901ce55f1c02b733.tar.gz pleroma-aeff2d647483d5348cc1da5c901ce55f1c02b733.zip |
Merge branch 'feature/unrepeats' into 'develop'
Add unrepeats
Closes #69
See merge request pleroma/pleroma!113
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) |