projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
988ca4a
)
CommonAPITest: Add test that deactivated users can't post.
author
lain
<lain@soykaf.club>
Tue, 4 Aug 2020 12:08:12 +0000
(14:08 +0200)
committer
lain
<lain@soykaf.club>
Tue, 4 Aug 2020 12:08:12 +0000
(14:08 +0200)
test/web/common_api/common_api_test.exs
patch
|
blob
|
history
diff --git
a/test/web/common_api/common_api_test.exs
b/test/web/common_api/common_api_test.exs
index 313dda21b491006786b01aa2beef24b62e476fc8..4ba6232dc7dafe2b3f59fb13e49ec7c95f5b9149 100644
(file)
--- 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)