diff --git a/lib/microwaveprop/rover/compute.ex b/lib/microwaveprop/rover/compute.ex
index eeddd0f4..cf4e14d2 100644
--- a/lib/microwaveprop/rover/compute.ex
+++ b/lib/microwaveprop/rover/compute.ex
@@ -131,10 +131,10 @@ defmodule Microwaveprop.Rover.Compute do
step.("Loading propagation grid")
raw_cells = time_step("scores_at", fn -> scores_at.(band_mhz, valid_time, bbox) end)
- ideal_locations = Map.get(args, :ideal_locations, nil)
+ good_locations = Map.get(args, :good_locations, nil)
candidate_cells =
- case ideal_locations do
+ case good_locations do
nil -> raw_cells
[] -> raw_cells
locations -> snap_cells_to_locations(locations, raw_cells)
@@ -334,7 +334,7 @@ defmodule Microwaveprop.Rover.Compute do
|> Canopy.lookup_many()
end
- # When the user constrains candidates to known ideal locations, build
+ # When the user constrains candidates to known good locations, build
# synthetic cells at each location's exact lat/lon, inheriting the
# propagation score from the nearest grid cell (so atmospheric forecast
# still factors in even though the spot itself isn't a grid centroid).
diff --git a/lib/microwaveprop/rover/location.ex b/lib/microwaveprop/rover/location.ex
index 083549d6..c14bf1db 100644
--- a/lib/microwaveprop/rover/location.ex
+++ b/lib/microwaveprop/rover/location.ex
@@ -4,21 +4,21 @@ defmodule Microwaveprop.Rover.Location do
user. Everyone can view the list; only authenticated users can create
entries (creator tracked via `user_id`).
- `status` is `:ideal` (recommended spot) or `:off_limits` (avoid —
+ `status` is `:good` (recommended spot) or `:bad` (avoid —
trespass, no-go, etc.).
"""
use Ecto.Schema
import Ecto.Changeset
- @statuses [:ideal, :off_limits]
+ @statuses [:good, :bad]
@primary_key {:id, :binary_id, autogenerate: true}
@foreign_key_type :binary_id
schema "rover_locations" do
field :lat, :float
field :lon, :float
- field :status, Ecto.Enum, values: @statuses, default: :ideal
+ field :status, Ecto.Enum, values: @statuses, default: :good
field :notes, :string
belongs_to :user, Microwaveprop.Accounts.User
diff --git a/lib/microwaveprop/rover_planning.ex b/lib/microwaveprop/rover_planning.ex
index 6b5009fa..824ae7d0 100644
--- a/lib/microwaveprop/rover_planning.ex
+++ b/lib/microwaveprop/rover_planning.ex
@@ -138,7 +138,7 @@ defmodule Microwaveprop.RoverPlanning do
end
defp candidate_rover_locations(%Mission{only_known_good: true}) do
- Repo.all(from(l in Location, where: l.status == :ideal))
+ Repo.all(from(l in Location, where: l.status == :good))
end
defp candidate_rover_locations(%Mission{only_known_good: false}) do
diff --git a/lib/microwaveprop/rover_planning/mission.ex b/lib/microwaveprop/rover_planning/mission.ex
index 2d292e1e..a2c025b0 100644
--- a/lib/microwaveprop/rover_planning/mission.ex
+++ b/lib/microwaveprop/rover_planning/mission.ex
@@ -6,7 +6,7 @@ defmodule Microwaveprop.RoverPlanning.Mission do
paths from each rover-location to each station (`paths`).
`only_known_good` toggles whether the rover endpoint set is the
- `:ideal` rover-locations (default) or every rover-location.
+ `:good` rover-locations (default) or every rover-location.
"""
use Ecto.Schema
diff --git a/lib/microwaveprop_web/live/rover_live.ex b/lib/microwaveprop_web/live/rover_live.ex
index 2a05a27e..79ae7f02 100644
--- a/lib/microwaveprop_web/live/rover_live.ex
+++ b/lib/microwaveprop_web/live/rover_live.ex
@@ -69,7 +69,7 @@ defmodule MicrowavepropWeb.RoverLive do
home_form_error: nil,
scoring_loading: false,
scoring_step: nil,
- only_ideal_locations: false,
+ only_good_locations: false,
url_loaded?: false
)}
end
@@ -196,8 +196,8 @@ defmodule MicrowavepropWeb.RoverLive do
|> push_event("update_drive_radius", %{km: radius_km})}
end
- def handle_event("toggle_only_ideal", _params, socket) do
- {:noreply, assign(socket, only_ideal_locations: not socket.assigns.only_ideal_locations)}
+ def handle_event("toggle_only_good", _params, socket) do
+ {:noreply, assign(socket, only_good_locations: not socket.assigns.only_good_locations)}
end
def handle_event("toggle_station", %{"id" => id}, socket) do
@@ -732,13 +732,13 @@ defmodule MicrowavepropWeb.RoverLive do
min_elev_gain: 0
}
- if socket.assigns.only_ideal_locations do
- ideals =
+ if socket.assigns.only_good_locations do
+ goods =
Rover.list_locations()
- |> Enum.filter(&(&1.status == :ideal))
+ |> Enum.filter(&(&1.status == :good))
|> Enum.map(fn l -> %{lat: l.lat, lon: l.lon} end)
- Map.put(base, :ideal_locations, ideals)
+ Map.put(base, :good_locations, goods)
else
base
end
@@ -984,7 +984,7 @@ defmodule MicrowavepropWeb.RoverLive do
class="absolute bottom-0 inset-x-0 bg-base-100/90 backdrop-blur border-t border-base-300 z-10"
>
- Ideal locations
+ Good locations
- Only use known ideal locations
+ Only use known good locations
- Restricts suggestions to spots tagged "ideal" in from(l in base, where: l.status == :ideal)
- "off_limits" -> from(l in base, where: l.status == :off_limits)
+ "good" -> from(l in base, where: l.status == :good)
+ "bad" -> from(l in base, where: l.status == :bad)
_ -> base
end
end
@@ -308,14 +308,14 @@ defmodule MicrowavepropWeb.RoverLocationsLive do
"""
end
- defp status_cell(:ideal) do
+ defp status_cell(:good) do
assigns = %{}
- ~H|Ideal|
+ ~H|Good|
end
- defp status_cell(:off_limits) do
+ defp status_cell(:bad) do
assigns = %{}
- ~H|Off Limits|
+ ~H|Bad|
end
defp status_cell(_), do: ""
@@ -389,7 +389,7 @@ defmodule MicrowavepropWeb.RoverLocationsLive do
field={@form[:status]}
type="select"
label="Status"
- options={[{"Ideal", :ideal}, {"Off Limits", :off_limits}]}
+ options={[{"Good", :good}, {"Bad", :bad}]}
/>
@@ -434,8 +434,8 @@ defmodule MicrowavepropWeb.RoverLocationsLive do
class="select select-sm select-bordered"
>
-
-
+
+
diff --git a/lib/microwaveprop_web/live/rover_locations_live/show.ex b/lib/microwaveprop_web/live/rover_locations_live/show.ex
index 740478c1..a3e1d98e 100644
--- a/lib/microwaveprop_web/live/rover_locations_live/show.ex
+++ b/lib/microwaveprop_web/live/rover_locations_live/show.ex
@@ -69,12 +69,12 @@ defmodule MicrowavepropWeb.RoverLocationsLive.Show do
end
end
- defp status_label(:ideal), do: "Ideal"
- defp status_label(:off_limits), do: "Off Limits"
+ defp status_label(:good), do: "Good"
+ defp status_label(:bad), do: "Bad"
defp status_label(_), do: ""
- defp status_class(:ideal), do: "badge badge-success"
- defp status_class(:off_limits), do: "badge badge-error"
+ defp status_class(:good), do: "badge badge-success"
+ defp status_class(:bad), do: "badge badge-error"
defp status_class(_), do: "badge"
@impl true
diff --git a/lib/microwaveprop_web/live/rover_planning_live/form.ex b/lib/microwaveprop_web/live/rover_planning_live/form.ex
index 7c70d08e..48f5e87c 100644
--- a/lib/microwaveprop_web/live/rover_planning_live/form.ex
+++ b/lib/microwaveprop_web/live/rover_planning_live/form.ex
@@ -228,7 +228,7 @@ defmodule MicrowavepropWeb.RoverPlanningLive.Form do
Only check against known good locations
- When checked, paths are computed only against rover-locations marked Ideal.
+ When checked, paths are computed only against rover-locations marked Good.
diff --git a/lib/microwaveprop_web/live/rover_planning_live/show.ex b/lib/microwaveprop_web/live/rover_planning_live/show.ex
index df70c58d..a8d3ed53 100644
--- a/lib/microwaveprop_web/live/rover_planning_live/show.ex
+++ b/lib/microwaveprop_web/live/rover_planning_live/show.ex
@@ -200,7 +200,7 @@ defmodule MicrowavepropWeb.RoverPlanningLive.Show do
Scope: {if @mission.only_known_good,
- do: "Known good locations only (status = ideal)",
+ do: "Known good locations only (status = good)",
else: "All rover locations"} · Owner: {(@mission.user && @mission.user.callsign) || "—"}
diff --git a/priv/repo/migrations/20260503160908_rename_rover_location_statuses.exs b/priv/repo/migrations/20260503160908_rename_rover_location_statuses.exs
new file mode 100644
index 00000000..7fb3b3d9
--- /dev/null
+++ b/priv/repo/migrations/20260503160908_rename_rover_location_statuses.exs
@@ -0,0 +1,15 @@
+defmodule Microwaveprop.Repo.Migrations.RenameRoverLocationStatuses do
+ use Ecto.Migration
+
+ def up do
+ execute("UPDATE rover_locations SET status = 'good' WHERE status = 'ideal'")
+ execute("UPDATE rover_locations SET status = 'bad' WHERE status = 'off_limits'")
+ execute("ALTER TABLE rover_locations ALTER COLUMN status SET DEFAULT 'good'")
+ end
+
+ def down do
+ execute("ALTER TABLE rover_locations ALTER COLUMN status SET DEFAULT 'ideal'")
+ execute("UPDATE rover_locations SET status = 'off_limits' WHERE status = 'bad'")
+ execute("UPDATE rover_locations SET status = 'ideal' WHERE status = 'good'")
+ end
+end
diff --git a/test/microwaveprop/rover/location_test.exs b/test/microwaveprop/rover/location_test.exs
index 185cf223..a50d6b1c 100644
--- a/test/microwaveprop/rover/location_test.exs
+++ b/test/microwaveprop/rover/location_test.exs
@@ -13,8 +13,8 @@ defmodule Microwaveprop.RoverLocationsTest do
a = user_fixture()
b = user_fixture()
- {:ok, _l1} = Rover.create_location(a, %{lat: 32.5, lon: -97.5, status: :ideal})
- {:ok, _l2} = Rover.create_location(b, %{lat: 33.0, lon: -96.5, status: :off_limits})
+ {:ok, _l1} = Rover.create_location(a, %{lat: 32.5, lon: -97.5, status: :good})
+ {:ok, _l2} = Rover.create_location(b, %{lat: 33.0, lon: -96.5, status: :bad})
result = Rover.list_locations()
assert length(result) == 2
@@ -25,33 +25,33 @@ defmodule Microwaveprop.RoverLocationsTest do
describe "create_location/2" do
test "stores the creator's user_id" do
user = user_fixture()
- {:ok, loc} = Rover.create_location(user, %{lat: 32.5, lon: -97.5, status: :ideal})
+ {:ok, loc} = Rover.create_location(user, %{lat: 32.5, lon: -97.5, status: :good})
assert loc.user_id == user.id
end
- test "supports notes and the off_limits status" do
+ test "supports notes and the bad status" do
user = user_fixture()
{:ok, loc} =
Rover.create_location(user, %{
lat: 32.0,
lon: -97.0,
- status: :off_limits,
+ status: :bad,
notes: "private property"
})
- assert loc.status == :off_limits
+ assert loc.status == :bad
assert loc.notes == "private property"
end
test "rejects out-of-range coordinates" do
user = user_fixture()
- assert {:error, %Ecto.Changeset{}} = Rover.create_location(user, %{lat: 100.0, lon: 0.0, status: :ideal})
+ assert {:error, %Ecto.Changeset{}} = Rover.create_location(user, %{lat: 100.0, lon: 0.0, status: :good})
end
test "requires lat and lon" do
user = user_fixture()
- assert {:error, cs} = Rover.create_location(user, %{status: :ideal})
+ assert {:error, cs} = Rover.create_location(user, %{status: :good})
assert "can't be blank" in errors_on(cs).lat
end
end
@@ -59,7 +59,7 @@ defmodule Microwaveprop.RoverLocationsTest do
describe "update_location/3 and delete_location/2" do
test "creator can update their location" do
user = user_fixture()
- {:ok, loc} = Rover.create_location(user, %{lat: 32.0, lon: -97.0, status: :ideal})
+ {:ok, loc} = Rover.create_location(user, %{lat: 32.0, lon: -97.0, status: :good})
assert {:ok, updated} = Rover.update_location(user, loc.id, %{notes: "updated"})
assert updated.notes == "updated"
@@ -68,7 +68,7 @@ defmodule Microwaveprop.RoverLocationsTest do
test "non-creator cannot update or delete" do
user = user_fixture()
other = user_fixture()
- {:ok, loc} = Rover.create_location(user, %{lat: 32.0, lon: -97.0, status: :ideal})
+ {:ok, loc} = Rover.create_location(user, %{lat: 32.0, lon: -97.0, status: :good})
assert {:error, :not_found} = Rover.update_location(other, loc.id, %{notes: "x"})
assert {:error, :not_found} = Rover.delete_location(other, loc.id)
@@ -76,7 +76,7 @@ defmodule Microwaveprop.RoverLocationsTest do
test "creator can delete their location" do
user = user_fixture()
- {:ok, loc} = Rover.create_location(user, %{lat: 32.0, lon: -97.0, status: :ideal})
+ {:ok, loc} = Rover.create_location(user, %{lat: 32.0, lon: -97.0, status: :good})
assert {:ok, _} = Rover.delete_location(user, loc.id)
refute Enum.any?(Rover.list_locations(), &(&1.id == loc.id))
diff --git a/test/microwaveprop/rover_planning_test.exs b/test/microwaveprop/rover_planning_test.exs
index 6125363a..c325fec7 100644
--- a/test/microwaveprop/rover_planning_test.exs
+++ b/test/microwaveprop/rover_planning_test.exs
@@ -27,7 +27,7 @@ defmodule Microwaveprop.RoverPlanningTest do
{:ok, loc} =
Rover.create_location(
user,
- Map.merge(%{lat: 32.5, lon: -97.5, status: :ideal}, attrs)
+ Map.merge(%{lat: 32.5, lon: -97.5, status: :good}, attrs)
)
loc
@@ -52,8 +52,8 @@ defmodule Microwaveprop.RoverPlanningTest do
describe "create_mission/2" do
test "inserts a mission with stations and enqueues a path per (rover × station) pair" do
user = AccountsFixtures.user_fixture()
- _ideal_loc = create_rover_location(%{lat: 32.0, lon: -97.0, status: :ideal})
- _off_limits = create_rover_location(%{lat: 33.0, lon: -98.0, status: :off_limits})
+ _ideal_loc = create_rover_location(%{lat: 32.0, lon: -97.0, status: :good})
+ _off_limits = create_rover_location(%{lat: 33.0, lon: -98.0, status: :bad})
assert {:ok, mission} = RoverPlanning.create_mission(user, valid_attrs())
assert mission.user_id == user.id
@@ -63,7 +63,7 @@ defmodule Microwaveprop.RoverPlanningTest do
assert is_float(station.lon)
paths = RoverPlanning.list_paths(mission)
- # only_known_good=true → only the :ideal location pairs with the station.
+ # only_known_good=true → only the :good location pairs with the station.
# Oban runs inline in test so the worker has already completed.
assert length(paths) == 1
assert hd(paths).status in [:complete, :failed]
@@ -71,8 +71,8 @@ defmodule Microwaveprop.RoverPlanningTest do
test "with only_known_good=false, all rover-locations get a path entry" do
user = AccountsFixtures.user_fixture()
- _ideal = create_rover_location(%{lat: 32.0, lon: -97.0, status: :ideal})
- _off = create_rover_location(%{lat: 33.0, lon: -98.0, status: :off_limits})
+ _ideal = create_rover_location(%{lat: 32.0, lon: -97.0, status: :good})
+ _off = create_rover_location(%{lat: 33.0, lon: -98.0, status: :bad})
attrs = valid_attrs(%{"only_known_good" => false})
assert {:ok, mission} = RoverPlanning.create_mission(user, attrs)
@@ -81,7 +81,7 @@ defmodule Microwaveprop.RoverPlanningTest do
test "missing stations returns a changeset error" do
user = AccountsFixtures.user_fixture()
- attrs = valid_attrs() |> Map.delete("stations")
+ attrs = Map.delete(valid_attrs(), "stations")
assert {:error, %Ecto.Changeset{} = cs} = RoverPlanning.create_mission(user, attrs)
refute cs.valid?
@@ -92,7 +92,7 @@ defmodule Microwaveprop.RoverPlanningTest do
describe "update_mission/3" do
test "owner can update a mission and paths get rebuilt" do
user = AccountsFixtures.user_fixture()
- _ = create_rover_location(%{lat: 32.0, lon: -97.0, status: :ideal})
+ _ = create_rover_location(%{lat: 32.0, lon: -97.0, status: :good})
{:ok, mission} = RoverPlanning.create_mission(user, valid_attrs())
[original] = RoverPlanning.list_paths(mission)
@@ -109,7 +109,7 @@ defmodule Microwaveprop.RoverPlanningTest do
test "non-owner update is denied" do
owner = AccountsFixtures.user_fixture()
other = AccountsFixtures.user_fixture()
- _ = create_rover_location(%{lat: 32.0, lon: -97.0, status: :ideal})
+ _ = create_rover_location(%{lat: 32.0, lon: -97.0, status: :good})
{:ok, mission} = RoverPlanning.create_mission(owner, valid_attrs())
assert {:error, :not_found} =
@@ -120,7 +120,7 @@ defmodule Microwaveprop.RoverPlanningTest do
owner = AccountsFixtures.user_fixture()
admin = AccountsFixtures.user_fixture()
{:ok, admin} = Microwaveprop.Accounts.admin_update_user(admin, %{is_admin: true})
- _ = create_rover_location(%{lat: 32.0, lon: -97.0, status: :ideal})
+ _ = create_rover_location(%{lat: 32.0, lon: -97.0, status: :good})
{:ok, mission} = RoverPlanning.create_mission(owner, valid_attrs())
assert {:ok, updated} =
diff --git a/test/microwaveprop_web/live/rover_locations_live/show_test.exs b/test/microwaveprop_web/live/rover_locations_live/show_test.exs
index 94fdc7a5..851524a9 100644
--- a/test/microwaveprop_web/live/rover_locations_live/show_test.exs
+++ b/test/microwaveprop_web/live/rover_locations_live/show_test.exs
@@ -13,7 +13,7 @@ defmodule MicrowavepropWeb.RoverLocationsLive.ShowTest do
Rover.create_location(user, %{
lat: 32.5,
lon: -97.5,
- status: :ideal,
+ status: :good,
notes: "great spot"
})
@@ -39,7 +39,7 @@ defmodule MicrowavepropWeb.RoverLocationsLive.ShowTest do
test "owner sees a Delete button; visitors do not", %{conn: conn} do
user = Microwaveprop.AccountsFixtures.user_fixture()
- {:ok, loc} = Rover.create_location(user, %{lat: 32.5, lon: -97.5, status: :ideal})
+ {:ok, loc} = Rover.create_location(user, %{lat: 32.5, lon: -97.5, status: :good})
# Anonymous: no Delete
{:ok, _lv, html} = live(conn, ~p"/rover-locations/#{loc.id}")
@@ -55,7 +55,7 @@ defmodule MicrowavepropWeb.RoverLocationsLive.ShowTest do
owner = Microwaveprop.AccountsFixtures.user_fixture()
admin = Microwaveprop.AccountsFixtures.user_fixture()
{:ok, admin} = Microwaveprop.Accounts.admin_update_user(admin, %{is_admin: true})
- {:ok, loc} = Rover.create_location(owner, %{lat: 32.5, lon: -97.5, status: :ideal})
+ {:ok, loc} = Rover.create_location(owner, %{lat: 32.5, lon: -97.5, status: :good})
conn = log_in_user(conn, admin)
{:ok, _lv, html} = live(conn, ~p"/rover-locations/#{loc.id}")
@@ -64,7 +64,7 @@ defmodule MicrowavepropWeb.RoverLocationsLive.ShowTest do
test "owner can delete from the show page and is redirected", %{conn: conn} do
user = Microwaveprop.AccountsFixtures.user_fixture()
- {:ok, loc} = Rover.create_location(user, %{lat: 32.5, lon: -97.5, status: :ideal})
+ {:ok, loc} = Rover.create_location(user, %{lat: 32.5, lon: -97.5, status: :good})
conn = log_in_user(conn, user)
{:ok, lv, _html} = live(conn, ~p"/rover-locations/#{loc.id}")
diff --git a/test/microwaveprop_web/live/rover_locations_live_test.exs b/test/microwaveprop_web/live/rover_locations_live_test.exs
index ca2173cd..ccab7771 100644
--- a/test/microwaveprop_web/live/rover_locations_live_test.exs
+++ b/test/microwaveprop_web/live/rover_locations_live_test.exs
@@ -20,12 +20,12 @@ defmodule MicrowavepropWeb.RoverLocationsLiveTest do
Rover.create_location(user, %{
lat: 32.5,
lon: -97.5,
- status: :ideal,
+ status: :good,
notes: "great hill"
})
{:ok, _lv, html} = live(conn, ~p"/rover-locations")
- assert html =~ "Ideal"
+ assert html =~ "Good"
assert html =~ "great hill"
end
@@ -37,8 +37,8 @@ defmodule MicrowavepropWeb.RoverLocationsLiveTest do
test "status filter narrows the visible rows", %{conn: conn} do
user = Microwaveprop.AccountsFixtures.user_fixture()
- {:ok, _} = Rover.create_location(user, %{lat: 32.0, lon: -97.0, status: :ideal, notes: "ideal-spot"})
- {:ok, _} = Rover.create_location(user, %{lat: 33.0, lon: -98.0, status: :off_limits, notes: "no-go-spot"})
+ {:ok, _} = Rover.create_location(user, %{lat: 32.0, lon: -97.0, status: :good, notes: "ideal-spot"})
+ {:ok, _} = Rover.create_location(user, %{lat: 33.0, lon: -98.0, status: :bad, notes: "no-go-spot"})
{:ok, lv, html} = live(conn, ~p"/rover-locations")
assert html =~ "ideal-spot"
@@ -46,7 +46,7 @@ defmodule MicrowavepropWeb.RoverLocationsLiveTest do
html =
lv
- |> form("form[phx-change=filter_status]", %{"value" => "ideal"})
+ |> form("form[phx-change=filter_status]", %{"value" => "good"})
|> render_change()
assert html =~ "ideal-spot"
@@ -54,7 +54,7 @@ defmodule MicrowavepropWeb.RoverLocationsLiveTest do
html =
lv
- |> form("form[phx-change=filter_status]", %{"value" => "off_limits"})
+ |> form("form[phx-change=filter_status]", %{"value" => "bad"})
|> render_change()
refute html =~ "ideal-spot"
@@ -72,7 +72,7 @@ defmodule MicrowavepropWeb.RoverLocationsLiveTest do
lv
|> form("#location-form",
- location: %{lat: "32.5", lon: "-97.5", status: "ideal", notes: "test note"}
+ location: %{lat: "32.5", lon: "-97.5", status: "good", notes: "test note"}
)
|> render_submit()
@@ -91,7 +91,7 @@ defmodule MicrowavepropWeb.RoverLocationsLiveTest do
grid: "EM12kp",
lat: "",
lon: "",
- status: "ideal",
+ status: "good",
notes: ""
}
)
@@ -113,7 +113,7 @@ defmodule MicrowavepropWeb.RoverLocationsLiveTest do
grid: "",
lat: "32.5",
lon: "-97.5",
- status: "ideal",
+ status: "good",
notes: ""
}
)
@@ -127,7 +127,7 @@ defmodule MicrowavepropWeb.RoverLocationsLiveTest do
Rover.create_location(user, %{
lat: 32.5,
lon: -97.5,
- status: :ideal,
+ status: :good,
notes: "rooftop spot"
})
@@ -138,8 +138,8 @@ defmodule MicrowavepropWeb.RoverLocationsLiveTest do
test "edit/delete buttons appear only on the owner's row", %{conn: conn, user: user} do
other = Microwaveprop.AccountsFixtures.user_fixture()
- {:ok, mine} = Rover.create_location(user, %{lat: 32.0, lon: -97.0, status: :ideal})
- {:ok, theirs} = Rover.create_location(other, %{lat: 33.0, lon: -98.0, status: :off_limits})
+ {:ok, mine} = Rover.create_location(user, %{lat: 32.0, lon: -97.0, status: :good})
+ {:ok, theirs} = Rover.create_location(other, %{lat: 33.0, lon: -98.0, status: :bad})
{:ok, lv, _html} = live(conn, ~p"/rover-locations")
@@ -156,7 +156,7 @@ defmodule MicrowavepropWeb.RoverLocationsLiveTest do
{:ok, admin} = Microwaveprop.Accounts.admin_update_user(admin, %{is_admin: true})
other = Microwaveprop.AccountsFixtures.user_fixture()
- {:ok, theirs} = Rover.create_location(other, %{lat: 33.0, lon: -98.0, status: :ideal})
+ {:ok, theirs} = Rover.create_location(other, %{lat: 33.0, lon: -98.0, status: :good})
conn = log_in_user(conn, admin)
{:ok, lv, _html} = live(conn, ~p"/rover-locations")
@@ -180,7 +180,7 @@ defmodule MicrowavepropWeb.RoverLocationsLiveTest do
Rover.create_location(other, %{
lat: 33.0,
lon: -98.0,
- status: :ideal,
+ status: :good,
notes: "old"
})
@@ -196,7 +196,7 @@ defmodule MicrowavepropWeb.RoverLocationsLiveTest do
location: %{
lat: "33.0",
lon: "-98.0",
- status: "off_limits",
+ status: "bad",
notes: "admin override"
}
)
@@ -204,7 +204,7 @@ defmodule MicrowavepropWeb.RoverLocationsLiveTest do
updated = Microwaveprop.Repo.get(Location, theirs.id)
assert updated.notes == "admin override"
- assert updated.status == :off_limits
+ assert updated.status == :bad
end
end
end
diff --git a/test/microwaveprop_web/live/rover_planning_live_test.exs b/test/microwaveprop_web/live/rover_planning_live_test.exs
index c331ad19..e819c1ce 100644
--- a/test/microwaveprop_web/live/rover_planning_live_test.exs
+++ b/test/microwaveprop_web/live/rover_planning_live_test.exs
@@ -19,7 +19,7 @@ defmodule MicrowavepropWeb.RoverPlanningLiveTest do
end
defp create_mission(user, name) do
- {:ok, _} = Rover.create_location(user, %{lat: 32.0, lon: -97.0, status: :ideal})
+ {:ok, _} = Rover.create_location(user, %{lat: 32.0, lon: -97.0, status: :good})
{:ok, mission} =
RoverPlanning.create_mission(user, %{
@@ -86,7 +86,7 @@ defmodule MicrowavepropWeb.RoverPlanningLiveTest do
test "logged-in user can create a mission with a callsign-input station",
%{conn: conn} do
user = AccountsFixtures.user_fixture()
- {:ok, _} = Rover.create_location(user, %{lat: 32.0, lon: -97.0, status: :ideal})
+ {:ok, _} = Rover.create_location(user, %{lat: 32.0, lon: -97.0, status: :good})
conn = log_in_user(conn, user)
{:ok, lv, html} = live(conn, ~p"/rover-planning/new")