test: MapLive.Index invalid-bounds rejection
This commit is contained in:
parent
b8bbfaaaaa
commit
cde015deca
1 changed files with 17 additions and 0 deletions
|
|
@ -788,6 +788,23 @@ defmodule AprsmeWeb.MapLive.IndexTest do
|
|||
assert Process.alive?(view.pid)
|
||||
end
|
||||
|
||||
test "invalid bounds (north <= south) is rejected silently", %{conn: conn} do
|
||||
{:ok, view, _html} = live(conn, "/", on_error: :warn)
|
||||
|
||||
# north <= south → invalid; the update should be silently skipped.
|
||||
bounds_params = %{
|
||||
"bounds" => %{
|
||||
"north" => 30.0,
|
||||
"south" => 40.0,
|
||||
"east" => -95.0,
|
||||
"west" => -97.0
|
||||
}
|
||||
}
|
||||
|
||||
assert render_hook(view, "bounds_changed", bounds_params)
|
||||
assert Process.alive?(view.pid)
|
||||
end
|
||||
|
||||
test "handles load_rf_path_station_packets with empty list", %{conn: conn} do
|
||||
{:ok, view, _html} = live(conn, "/", on_error: :warn)
|
||||
send(view.pid, {:load_rf_path_station_packets, []})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue