diff --git a/test/safira_web/live/user_login_live_test.exs b/test/safira_web/live/user_login_live_test.exs index 4329414f..289bc67b 100644 --- a/test/safira_web/live/user_login_live_test.exs +++ b/test/safira_web/live/user_login_live_test.exs @@ -4,6 +4,8 @@ defmodule SafiraWeb.UserLoginLiveTest do import Phoenix.LiveViewTest import Safira.AccountsFixtures + alias Safira.Event + describe "Log in page" do test "redirects if already logged in", %{conn: conn} do result = @@ -51,6 +53,8 @@ defmodule SafiraWeb.UserLoginLiveTest do describe "login navigation" do test "redirects to registration page when the Register button is clicked", %{conn: conn} do + Event.change_registrations_open(true) + {:ok, lv, _html} = live(conn, ~p"/users/log_in") {:ok, _login_live, login_html} = diff --git a/test/safira_web/live/user_reset_password_live_test.exs b/test/safira_web/live/user_reset_password_live_test.exs index b7076b89..27f54a30 100644 --- a/test/safira_web/live/user_reset_password_live_test.exs +++ b/test/safira_web/live/user_reset_password_live_test.exs @@ -4,7 +4,7 @@ defmodule SafiraWeb.UserResetPasswordLiveTest do import Phoenix.LiveViewTest import Safira.AccountsFixtures - alias Safira.Accounts + alias Safira.{Accounts, Event} setup do user = user_fixture() @@ -14,6 +14,8 @@ defmodule SafiraWeb.UserResetPasswordLiveTest do Accounts.deliver_user_reset_password_instructions(user, url) end) + Event.change_registrations_open(true) + %{token: token, user: user} end