aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-08-04 14:08:12 +0200
committerlain <lain@soykaf.club>2020-08-04 14:08:12 +0200
commite92c040ad3d0cc568ea0dc4b79f207a392c7c90f (patch)
tree4f2b62a9485324acbd60c95036225adcc5da118a
parent988ca4ab6a0d299308d96e84aa45ef63341128bf (diff)
downloadpleroma-e92c040ad3d0cc568ea0dc4b79f207a392c7c90f.tar.gz
CommonAPITest: Add test that deactivated users can't post.
-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 313dda21b..4ba6232dc 100644
--- a/test/web/common_api/common_api_test.exs
+++ b/test/web/common_api/common_api_test.exs
@@ -458,6 +458,11 @@ defmodule Pleroma.Web.CommonAPITest do
end
describe "posting" do
+ test "deactivated users can't post" do
+ user = insert(:user, deactivated: true)
+ assert {:error, _} = CommonAPI.post(user, %{status: "ye"})
+ end
+
test "it supports explicit addressing" do
user = insert(:user)
user_two = insert(:user)