projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SideEffects: Run in transaction.
[akkoma]
/
test
/
plugs
/
user_is_admin_plug_test.exs
diff --git
a/test/plugs/user_is_admin_plug_test.exs
b/test/plugs/user_is_admin_plug_test.exs
index cd0ad0786dc8e05d70ac7377ad5e991f3975ae23..fd6a50e534e62079d33993470f000322fac93792 100644
(file)
--- a/
test/plugs/user_is_admin_plug_test.exs
+++ b/
test/plugs/user_is_admin_plug_test.exs
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
19
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
20
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Plugs.UserIsAdminPlugTest do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Plugs.UserIsAdminPlugTest do
@@
-9,9
+9,7
@@
defmodule Pleroma.Plugs.UserIsAdminPlugTest do
import Pleroma.Factory
describe "unless [:auth, :enforce_oauth_admin_scope_usage]," do
import Pleroma.Factory
describe "unless [:auth, :enforce_oauth_admin_scope_usage]," do
- clear_config([:auth, :enforce_oauth_admin_scope_usage]) do
- Pleroma.Config.put([:auth, :enforce_oauth_admin_scope_usage], false)
- end
+ setup do: clear_config([:auth, :enforce_oauth_admin_scope_usage], false)
test "accepts a user that is an admin" do
user = insert(:user, is_admin: true)
test "accepts a user that is an admin" do
user = insert(:user, is_admin: true)
@@
-42,9
+40,7
@@
defmodule Pleroma.Plugs.UserIsAdminPlugTest do
end
describe "with [:auth, :enforce_oauth_admin_scope_usage]," do
end
describe "with [:auth, :enforce_oauth_admin_scope_usage]," do
- clear_config([:auth, :enforce_oauth_admin_scope_usage]) do
- Pleroma.Config.put([:auth, :enforce_oauth_admin_scope_usage], true)
- end
+ setup do: clear_config([:auth, :enforce_oauth_admin_scope_usage], true)
setup do
admin_user = insert(:user, is_admin: true)
setup do
admin_user = insert(:user, is_admin: true)