test: UserResetPasswordLive HIBP check_password_breach with value branch
This commit is contained in:
parent
84c839a218
commit
16bbf07dd5
1 changed files with 8 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue