Merge branch 'feature/unrepeats' into 'develop'
Add unrepeats Closes #69 See merge request pleroma/pleroma!113
This commit is contained in:
commit
aeff2d6474
14 changed files with 280 additions and 26 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue