fix: add __changed__ to test socket assigns for LiveView assign/3 compatibility
When cancel_pending_loads now succeeds (after fixing the pending_batch_tasks
KeyError), it calls Phoenix.LiveView.assign/3 which requires __changed__ in
the socket assigns. The test socket was created as a bare %Socket{} without
this internal LiveView field.
This commit is contained in:
parent
9111e6355a
commit
ecf3e0544c
1 changed files with 2 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ defmodule AprsmeWeb.MapLive.DisplayManagerTest do
|
|||
setup do
|
||||
socket = %Socket{
|
||||
assigns: %{
|
||||
__changed__: %{},
|
||||
visible_packets: %{},
|
||||
tracked_callsign: nil,
|
||||
packet_age_threshold: nil,
|
||||
|
|
@ -43,6 +44,7 @@ defmodule AprsmeWeb.MapLive.DisplayManagerTest do
|
|||
# Builds from known base defaults so callers can pass only overrides.
|
||||
defp update_assigns(socket, overrides) do
|
||||
base = %{
|
||||
__changed__: %{},
|
||||
visible_packets: %{},
|
||||
tracked_callsign: nil,
|
||||
packet_age_threshold: nil,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue