CommonAPITest: Add test that deactivated users can't post.

This commit is contained in:
lain 2020-08-04 14:08:12 +02:00
parent 988ca4ab6a
commit e92c040ad3
1 changed files with 5 additions and 0 deletions

View File

@ -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)