fix: add __changed__ to test socket assigns for LiveView assign/3 compatibility
All checks were successful
Elixir CI / Build and test (push) Successful in 3m38s
Elixir CI / Dialyzer (push) Successful in 3m58s
Elixir CI / Build and Push Docker Image (push) Successful in 2m40s

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:
Graham McIntire 2026-08-06 18:02:15 -05:00
parent 9111e6355a
commit ecf3e0544c
No known key found for this signature in database
GPG key ID: F4ABF488E6029E59

View file

@ -7,6 +7,7 @@ defmodule AprsmeWeb.MapLive.DisplayManagerTest do
setup do setup do
socket = %Socket{ socket = %Socket{
assigns: %{ assigns: %{
__changed__: %{},
visible_packets: %{}, visible_packets: %{},
tracked_callsign: nil, tracked_callsign: nil,
packet_age_threshold: 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. # Builds from known base defaults so callers can pass only overrides.
defp update_assigns(socket, overrides) do defp update_assigns(socket, overrides) do
base = %{ base = %{
__changed__: %{},
visible_packets: %{}, visible_packets: %{},
tracked_callsign: nil, tracked_callsign: nil,
packet_age_threshold: nil, packet_age_threshold: nil,