diff --git a/test/towerops_web/live/user_reset_password_live_test.exs b/test/towerops_web/live/user_reset_password_live_test.exs index fccdf49b..c793567f 100644 --- a/test/towerops_web/live/user_reset_password_live_test.exs +++ b/test/towerops_web/live/user_reset_password_live_test.exs @@ -78,5 +78,13 @@ defmodule ToweropsWeb.UserResetPasswordLiveTest do assert render_hook(lv, "check_password_breach", %{}) end + + test "check_password_breach event with a value drives the HIBP path", %{conn: conn, token: token} do + {:ok, lv, _html} = live(conn, ~p"/users/reset-password/#{token}") + + # The HIBP path either returns a count or :unknown — both branches are + # safe and the LiveView must stay alive. + assert render_hook(lv, "check_password_breach", %{"value" => "Anything-NonEmpty-Pass!"}) + end end end