aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-06-29 22:24:03 +0300
committerAriadne Conill <ariadne@dereferenced.org>2019-07-28 22:39:10 +0000
commit6a35c151c6a92c41dd198aa994b95fd7ad4953c0 (patch)
tree12e29b1b3777837a8c183c4b8273d65ba715a0c4 /test
parent1e5d889aec517cb1d66b1905f2cf04adada5d108 (diff)
downloadpleroma-6a35c151c6a92c41dd198aa994b95fd7ad4953c0.tar.gz
Fix not being able to pin unlisted posts
Closes #1038
Diffstat (limited to 'test')
-rw-r--r--test/web/common_api/common_api_test.exs5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs
index e96106f11..6f57bbe1f 100644
--- a/test/web/common_api/common_api_test.exs
+++ b/test/web/common_api/common_api_test.exs
@@ -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)