Fix failing tests after switching to textarea (#622)

This commit is contained in:
Jamil
2022-05-17 22:36:16 -07:00
committed by GitHub
parent c5a4fa7768
commit 7679d66efe
2 changed files with 6 additions and 3 deletions

View File

@@ -69,7 +69,8 @@ defmodule FzHttpWeb.SettingLive.SiteTest do
refute test_view =~ "is invalid"
assert test_view =~ """
<input class="input " id="site_form_component_allowed_ips" name="site[allowed_ips]" placeholder="0.0.0.0/0, ::/0" type="text" value="1.1.1.1"/>\
<textarea class="textarea " id="site_form_component_allowed_ips" name="site[allowed_ips]" placeholder="0.0.0.0/0, ::/0">
1.1.1.1</textarea>\
"""
end
@@ -134,7 +135,8 @@ defmodule FzHttpWeb.SettingLive.SiteTest do
assert test_view =~ "is invalid"
assert test_view =~ """
<input class="input is-danger" id="site_form_component_allowed_ips" name="site[allowed_ips]" placeholder="0.0.0.0/0, ::/0" type="text" value="foobar"/>\
<textarea class="textarea is-danger" id="site_form_component_allowed_ips" name="site[allowed_ips]" placeholder="0.0.0.0/0, ::/0">
foobar</textarea>\
"""
end

View File

@@ -363,7 +363,8 @@ defmodule FzHttpWeb.UserLive.ShowTest do
|> render_change(@default_allowed_ips_change)
assert test_view =~ """
<input class="input " id="create-device_allowed_ips" name="device[allowed_ips]" type="text"/>\
<textarea class="textarea " id="create-device_allowed_ips" name="device[allowed_ips]">
</textarea>\
"""
end