Fix not being able to pin unlisted posts

Closes #1038
This commit is contained in:
rinpatch 2019-06-29 22:24:03 +03:00
commit 4c60a562a7
3 changed files with 9 additions and 2 deletions

View file

@ -188,6 +188,11 @@ defmodule Pleroma.Web.CommonAPITest do
assert %User{info: %{pinned_activities: [^id]}} = user
end
test "unlisted statuses can be pinned", %{user: user} do
{:ok, activity} = CommonAPI.post(user, %{"status" => "HI!!!", "visibility" => "unlisted"})
assert {:ok, ^activity} = CommonAPI.pin(activity.id, user)
end
test "only self-authored can be pinned", %{activity: activity} do
user = insert(:user)