Formatter pass

This commit is contained in:
Claudio Ortolina
2024-09-14 14:19:45 +01:00
parent 170f195aae
commit 705fd665d2
5 changed files with 31 additions and 7 deletions
+1 -2
View File
@@ -11,8 +11,7 @@ defmodule MusicLibrary.Application do
MusicLibraryWeb.Telemetry,
MusicLibrary.Repo,
{Ecto.Migrator,
repos: Application.fetch_env!(:music_library, :ecto_repos),
skip: skip_migrations?()},
repos: Application.fetch_env!(:music_library, :ecto_repos), skip: skip_migrations?()},
{DNSCluster, query: Application.get_env(:music_library, :dns_cluster_query) || :ignore},
{Phoenix.PubSub, name: MusicLibrary.PubSub},
# Start a worker by calling: MusicLibrary.Worker.start_link(arg)
@@ -34,7 +34,12 @@
</:action>
</.table>
<.modal :if={@live_action in [:new, :edit]} id="record-modal" show on_cancel={JS.patch(~p"/records")}>
<.modal
:if={@live_action in [:new, :edit]}
id="record-modal"
show
on_cancel={JS.patch(~p"/records")}
>
<.live_component
module={MusicLibraryWeb.RecordLive.FormComponent}
id={@record.id || :new}
@@ -19,7 +19,12 @@
<.back navigate={~p"/records"}>Back to records</.back>
<.modal :if={@live_action == :edit} id="record-modal" show on_cancel={JS.patch(~p"/records/#{@record}")}>
<.modal
:if={@live_action == :edit}
id="record-modal"
show
on_cancel={JS.patch(~p"/records/#{@record}")}
>
<.live_component
module={MusicLibraryWeb.RecordLive.FormComponent}
id={@record.id}
@@ -9,6 +9,7 @@ defmodule MusicLibraryWeb.ErrorHTMLTest do
end
test "renders 500.html" do
assert render_to_string(MusicLibraryWeb.ErrorHTML, "500", "html", []) == "Internal Server Error"
assert render_to_string(MusicLibraryWeb.ErrorHTML, "500", "html", []) ==
"Internal Server Error"
end
end
@@ -4,8 +4,22 @@ defmodule MusicLibraryWeb.RecordLiveTest do
import Phoenix.LiveViewTest
import MusicLibrary.RecordsFixtures
@create_attrs %{type: :album, title: "some title", image: "some image", year: 42, musicbrainz_id: "7488a646-e31f-11e4-aace-600308960662", genres: ["option1", "option2"]}
@update_attrs %{type: :ep, title: "some updated title", image: "some updated image", year: 43, musicbrainz_id: "7488a646-e31f-11e4-aace-600308960668", genres: ["option1"]}
@create_attrs %{
type: :album,
title: "some title",
image: "some image",
year: 42,
musicbrainz_id: "7488a646-e31f-11e4-aace-600308960662",
genres: ["option1", "option2"]
}
@update_attrs %{
type: :ep,
title: "some updated title",
image: "some updated image",
year: 43,
musicbrainz_id: "7488a646-e31f-11e4-aace-600308960668",
genres: ["option1"]
}
@invalid_attrs %{type: nil, title: nil, image: nil, year: nil, musicbrainz_id: nil, genres: []}
defp create_record(_) do