prop/test/support/fixtures/beacons_fixtures.ex
Graham McIntire b656e015bf Beacon power in mW, settings tweaks
- Rename beacons.power_watts to power_mw (migration multiplies existing
  values by 1000); form/list/show all relabeled to "Power (mW)"
- Fix Add-monitor button alignment on /users/settings by rendering the
  label above and putting the input and button in a plain flex row so
  the input wrapper margin no longer offsets the button
- Extend the settings page re-auth window from 10 minutes to 24 hours
2026-04-08 12:45:35 -05:00

23 lines
503 B
Elixir

defmodule Microwaveprop.BeaconsFixtures do
@moduledoc """
Test helpers for creating beacon records.
"""
alias Microwaveprop.Beacons
def valid_beacon_attrs(attrs \\ %{}) do
Enum.into(attrs, %{
frequency_mhz: 10_368.1,
callsign: "W5HN",
lat: 32.897,
lon: -97.038,
power_mw: 10_000.0,
height_m: 30.0
})
end
def beacon_fixture(user, attrs \\ %{}) do
{:ok, beacon} = Beacons.create_beacon(user, valid_beacon_attrs(attrs))
beacon
end
end