summaryrefslogtreecommitdiff
path: root/test/web/common_api/common_api_test.exs
diff options
context:
space:
mode:
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>2019-06-30 00:59:40 +0000
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>2019-06-30 00:59:40 +0000
commit4a1c36e18f8c6c22e63a5ad996276cd2a2aeef81 (patch)
tree03c4dd10abf10286de495e8df7ccf23407ab0efb /test/web/common_api/common_api_test.exs
parent9b1e75bac8f6e042e7f70e4f29cc60fa96000323 (diff)
parent4c60a562a7392294683caae71827d0053a3c3466 (diff)
downloadpleroma-4a1c36e18f8c6c22e63a5ad996276cd2a2aeef81.tar.gz
pleroma-4a1c36e18f8c6c22e63a5ad996276cd2a2aeef81.zip
Merge branch 'fix/pin-unlisted' into 'develop'
Fix not being able to pin unlisted posts Closes #1038 See merge request pleroma/pleroma!1364
Diffstat (limited to 'test/web/common_api/common_api_test.exs')
-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)