summaryrefslogtreecommitdiff
path: root/test/web/common_api/common_api_test.exs
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-10-01 19:08:25 +0200
committerThibaut Girka <thib@sitedethib.com>2019-10-01 20:38:29 +0200
commit7d5a9f3f6d393c744364148568cfb9b0249789fc (patch)
tree53d44d0b78ccbbd7879d1b337a0cd34b656305de /test/web/common_api/common_api_test.exs
parent4c1f158f5de95581f1489be32614e0e75bc77ba4 (diff)
downloadpleroma-7d5a9f3f6d393c744364148568cfb9b0249789fc.tar.gz
pleroma-7d5a9f3f6d393c744364148568cfb9b0249789fc.zip
Add tests for privately announcing statuses via API
Diffstat (limited to 'test/web/common_api/common_api_test.exs')
-rw-r--r--test/web/common_api/common_api_test.exs12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs
index 0f4a5eb25..2d3c41e82 100644
--- a/test/web/common_api/common_api_test.exs
+++ b/test/web/common_api/common_api_test.exs
@@ -231,6 +231,18 @@ defmodule Pleroma.Web.CommonAPITest do
{:ok, %Activity{}, _} = CommonAPI.repeat(activity.id, user)
end
+ test "repeating a status privately" do
+ user = insert(:user)
+ other_user = insert(:user)
+
+ {:ok, activity} = CommonAPI.post(other_user, %{"status" => "cofe"})
+
+ {:ok, %Activity{} = announce_activity, _} =
+ CommonAPI.repeat(activity.id, user, %{"visibility" => "private"})
+
+ assert Visibility.is_private?(announce_activity)
+ end
+
test "favoriting a status" do
user = insert(:user)
other_user = insert(:user)