mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-13 16:34:45 +08:00
Fix user profile edits to not crash on the homepage (#1268)
This commit is contained in:
parent
14538b7aa1
commit
1757e21bca
2 changed files with 12 additions and 0 deletions
|
@ -341,6 +341,8 @@ defmodule LivebookWeb.HomeLive do
|
||||||
{:noreply, assign(socket, memory: memory)}
|
{:noreply, assign(socket, memory: memory)}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def handle_info(_message, socket), do: {:noreply, socket}
|
||||||
|
|
||||||
defp files(sessions) do
|
defp files(sessions) do
|
||||||
Enum.map(sessions, & &1.file)
|
Enum.map(sessions, & &1.file)
|
||||||
end
|
end
|
||||||
|
|
|
@ -388,6 +388,16 @@ defmodule LivebookWeb.HomeLiveTest do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test "handles user profile update", %{conn: conn} do
|
||||||
|
{:ok, view, _} = live(conn, "/")
|
||||||
|
|
||||||
|
view
|
||||||
|
|> element("#user_form")
|
||||||
|
|> render_submit(%{data: %{hex_color: "#123456"}})
|
||||||
|
|
||||||
|
assert render(view) =~ "#123456"
|
||||||
|
end
|
||||||
|
|
||||||
# Helpers
|
# Helpers
|
||||||
|
|
||||||
defp test_notebook_path(name) do
|
defp test_notebook_path(name) do
|
||||||
|
|
Loading…
Add table
Reference in a new issue