projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86c18e4
)
AdminApiControllerTest: Add test that `deleted` users get deactivated.
author
lain
<lain@soykaf.club>
Wed, 12 Aug 2020 14:31:00 +0000
(16:31 +0200)
committer
lain
<lain@soykaf.club>
Wed, 12 Aug 2020 14:31:00 +0000
(16:31 +0200)
test/web/admin_api/controllers/admin_api_controller_test.exs
patch
|
blob
|
history
diff --git
a/test/web/admin_api/controllers/admin_api_controller_test.exs
b/test/web/admin_api/controllers/admin_api_controller_test.exs
index eca9272e016c4014d815771ea01677a9c81b576b..66d4b1ef36bf03666cf32f4ad9610738aa479be8 100644
(file)
--- a/
test/web/admin_api/controllers/admin_api_controller_test.exs
+++ b/
test/web/admin_api/controllers/admin_api_controller_test.exs
@@
-158,6
+158,8
@@
defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
user = insert(:user)
clear_config([:instance, :federating], true)
+ refute user.deactivated
+
with_mock Pleroma.Web.Federator,
publish: fn _ -> nil end do
conn =
@@
-176,6
+178,9
@@
defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
assert json_response(conn, 200) == [user.nickname]
+ user = Repo.get(User, user.id)
+ assert user.deactivated
+
assert called(Pleroma.Web.Federator.publish(:_))
end
end