diff --git a/test/towerops_web/controllers/admin_controller_test.exs b/test/towerops_web/controllers/admin_controller_test.exs index 373255dd..1ff4f27e 100644 --- a/test/towerops_web/controllers/admin_controller_test.exs +++ b/test/towerops_web/controllers/admin_controller_test.exs @@ -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!()