refactor: fix review comments
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
93e1ec7414
commit
b1740e3435
10 changed files with 63 additions and 199 deletions
|
|
@ -1,5 +1,5 @@
|
|||
defmodule MvWeb.GlobalSettingsLiveTest do
|
||||
use MvWeb.ConnCase, async: true
|
||||
use MvWeb.ConnCase, async: false
|
||||
import Phoenix.LiveViewTest
|
||||
alias Mv.Membership
|
||||
|
||||
|
|
@ -203,6 +203,20 @@ defmodule MvWeb.GlobalSettingsLiveTest do
|
|||
refute has_element?(view, "#setting_smtp_host[disabled]")
|
||||
refute has_element?(view, "#setting_smtp_username[disabled]")
|
||||
end
|
||||
|
||||
@tag :ui
|
||||
test "shows effective ENV SMTP host value in disabled field", %{conn: conn} do
|
||||
clear_smtp_env()
|
||||
System.put_env("SMTP_HOST", "smtp.env-active.example")
|
||||
on_exit(fn -> clear_smtp_env() end)
|
||||
|
||||
{:ok, settings} = Membership.get_settings()
|
||||
{:ok, _} = Membership.update_settings(settings, %{smtp_host: "smtp.db-legacy.example"})
|
||||
|
||||
{:ok, _view, html} = live(conn, ~p"/settings")
|
||||
assert html =~ ~s(value="smtp.env-active.example")
|
||||
refute html =~ ~s(value="smtp.db-legacy.example")
|
||||
end
|
||||
end
|
||||
|
||||
describe "Authentication section when OIDC-only is enabled" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue