summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortusooa <tusooa@kazv.moe>2023-07-10 19:43:18 -0400
committertusooa <tusooa@kazv.moe>2023-09-13 19:19:05 -0400
commit762794eed9e6fc8a03d1416e2a6e080b00df9e10 (patch)
treeba4f3c7ffd23a93854f1d4b84b2ca065a6486b41
parentd244c9d2984d21887f50737597fc03d2d0dd1601 (diff)
downloadpleroma-762794eed9e6fc8a03d1416e2a6e080b00df9e10.tar.gz
pleroma-762794eed9e6fc8a03d1416e2a6e080b00df9e10.zip
Fix CommonAPITest
-rw-r--r--test/pleroma/web/common_api_test.exs9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs
index c4eba8b9c..70a5b6fed 100644
--- a/test/pleroma/web/common_api_test.exs
+++ b/test/pleroma/web/common_api_test.exs
@@ -825,16 +825,23 @@ defmodule Pleroma.Web.CommonAPITest do
test "quote posting visibility" do
user = insert(:user)
+ another_user = insert(:user)
{:ok, direct} = CommonAPI.post(user, %{status: ".", visibility: "direct"})
{:ok, private} = CommonAPI.post(user, %{status: ".", visibility: "private"})
{:ok, unlisted} = CommonAPI.post(user, %{status: ".", visibility: "unlisted"})
+ {:ok, local} = CommonAPI.post(user, %{status: ".", visibility: "local"})
{:ok, public} = CommonAPI.post(user, %{status: ".", visibility: "public"})
{:error, _} = CommonAPI.post(user, %{status: "nice", quote_id: direct.id})
- {:error, _} = CommonAPI.post(user, %{status: "nice", quote_id: private.id})
+ {:ok, _} = CommonAPI.post(user, %{status: "nice", quote_id: private.id})
+ {:error, _} = CommonAPI.post(another_user, %{status: "nice", quote_id: private.id})
{:ok, _} = CommonAPI.post(user, %{status: "nice", quote_id: unlisted.id})
+ {:ok, _} = CommonAPI.post(another_user, %{status: "nice", quote_id: unlisted.id})
+ {:ok, _} = CommonAPI.post(user, %{status: "nice", quote_id: local.id})
+ {:ok, _} = CommonAPI.post(another_user, %{status: "nice", quote_id: local.id})
{:ok, _} = CommonAPI.post(user, %{status: "nice", quote_id: public.id})
+ {:ok, _} = CommonAPI.post(another_user, %{status: "nice", quote_id: public.id})
end
end