fix(tests): enable TOTP in final AdminControllerTest
Enable TOTP in impersonation test for superuser authentication flow.
This commit is contained in:
parent
be9ebff63e
commit
b5cf562e55
1 changed files with 4 additions and 2 deletions
|
|
@ -68,7 +68,8 @@ defmodule ToweropsWeb.AdminControllerTest do
|
|||
describe "DELETE /admin/impersonate" do
|
||||
test "superuser can stop impersonation of another superuser", %{conn: conn} do
|
||||
superuser =
|
||||
user_fixture()
|
||||
[enable_totp: true]
|
||||
|> user_fixture()
|
||||
|> Ecto.Changeset.change(%{is_superuser: true})
|
||||
|> Towerops.Repo.update!()
|
||||
|
||||
|
|
@ -77,7 +78,8 @@ defmodule ToweropsWeb.AdminControllerTest do
|
|||
# Impersonating another superuser so require_superuser passes
|
||||
# (scope.user is the target, which must be superuser to reach the action)
|
||||
other_superuser =
|
||||
user_fixture()
|
||||
[enable_totp: true]
|
||||
|> user_fixture()
|
||||
|> Ecto.Changeset.change(%{is_superuser: true})
|
||||
|> Towerops.Repo.update!()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue