From: lain Date: Tue, 4 Aug 2020 12:08:12 +0000 (+0200) Subject: CommonAPITest: Add test that deactivated users can't post. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=e92c040ad3d0cc568ea0dc4b79f207a392c7c90f;p=akkoma CommonAPITest: Add test that deactivated users can't post. --- 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)