feat: Improve handling of association name config
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
605a897045
commit
2443bc62ac
9 changed files with 179 additions and 4 deletions
26
test/mv_web/components/layouts_test.exs
Normal file
26
test/mv_web/components/layouts_test.exs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
defmodule MvWeb.LayoutsTest do
|
||||
use MvWeb.ConnCase, async: false
|
||||
|
||||
import Phoenix.LiveViewTest
|
||||
|
||||
alias Mv.Membership
|
||||
alias MvWeb.Layouts
|
||||
|
||||
describe "app/1" do
|
||||
test "prefers provided club_name over settings fallback" do
|
||||
{:ok, settings} = Membership.get_settings()
|
||||
{:ok, _} = Membership.update_settings(settings, %{club_name: "Settings Club Name"})
|
||||
|
||||
html =
|
||||
render_component(&Layouts.app/1, %{
|
||||
flash: %{},
|
||||
current_user: nil,
|
||||
club_name: "Provided Club Name",
|
||||
inner_block: [%{inner_block: fn _, _ -> "content" end}]
|
||||
})
|
||||
|
||||
assert html =~ "Provided Club Name"
|
||||
refute html =~ "Settings Club Name"
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue