Formatter pass
This commit is contained in:
@@ -11,8 +11,7 @@ defmodule MusicLibrary.Application do
|
|||||||
MusicLibraryWeb.Telemetry,
|
MusicLibraryWeb.Telemetry,
|
||||||
MusicLibrary.Repo,
|
MusicLibrary.Repo,
|
||||||
{Ecto.Migrator,
|
{Ecto.Migrator,
|
||||||
repos: Application.fetch_env!(:music_library, :ecto_repos),
|
repos: Application.fetch_env!(:music_library, :ecto_repos), skip: skip_migrations?()},
|
||||||
skip: skip_migrations?()},
|
|
||||||
{DNSCluster, query: Application.get_env(:music_library, :dns_cluster_query) || :ignore},
|
{DNSCluster, query: Application.get_env(:music_library, :dns_cluster_query) || :ignore},
|
||||||
{Phoenix.PubSub, name: MusicLibrary.PubSub},
|
{Phoenix.PubSub, name: MusicLibrary.PubSub},
|
||||||
# Start a worker by calling: MusicLibrary.Worker.start_link(arg)
|
# Start a worker by calling: MusicLibrary.Worker.start_link(arg)
|
||||||
|
|||||||
@@ -34,7 +34,12 @@
|
|||||||
</:action>
|
</:action>
|
||||||
</.table>
|
</.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
|
<.live_component
|
||||||
module={MusicLibraryWeb.RecordLive.FormComponent}
|
module={MusicLibraryWeb.RecordLive.FormComponent}
|
||||||
id={@record.id || :new}
|
id={@record.id || :new}
|
||||||
|
|||||||
@@ -19,7 +19,12 @@
|
|||||||
|
|
||||||
<.back navigate={~p"/records"}>Back to records</.back>
|
<.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
|
<.live_component
|
||||||
module={MusicLibraryWeb.RecordLive.FormComponent}
|
module={MusicLibraryWeb.RecordLive.FormComponent}
|
||||||
id={@record.id}
|
id={@record.id}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ defmodule MusicLibraryWeb.ErrorHTMLTest do
|
|||||||
end
|
end
|
||||||
|
|
||||||
test "renders 500.html" do
|
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
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -4,8 +4,22 @@ defmodule MusicLibraryWeb.RecordLiveTest do
|
|||||||
import Phoenix.LiveViewTest
|
import Phoenix.LiveViewTest
|
||||||
import MusicLibrary.RecordsFixtures
|
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"]}
|
@create_attrs %{
|
||||||
@update_attrs %{type: :ep, title: "some updated title", image: "some updated image", year: 43, musicbrainz_id: "7488a646-e31f-11e4-aace-600308960668", genres: ["option1"]}
|
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: []}
|
@invalid_attrs %{type: nil, title: nil, image: nil, year: nil, musicbrainz_id: nil, genres: []}
|
||||||
|
|
||||||
defp create_record(_) do
|
defp create_record(_) do
|
||||||
|
|||||||
Reference in New Issue
Block a user