- Delete dead config keys and test file (typo'd aprsme_is_*, vacuous disable test) - Remove duplicate function clauses and identical function pairs - Rename misleading one_hour_ago variable to one_day_ago - Strip stale Oban comment - Remove TestHelpers time function duplicates - Inline Aprsme.Schema module (only 1 caller) - Deduplicate prod esbuild config - Thin SymbolRenderer delegations, inline TimeUtils wrappers - Remove redundant DeploymentNotifier GenServer polling - Replace random fallback in get_callsign_key with sentinel
16 lines
460 B
Elixir
16 lines
460 B
Elixir
defmodule Aprsme.DeploymentNotifierTest do
|
|
use ExUnit.Case, async: false
|
|
|
|
alias Aprsme.DeploymentNotifier
|
|
|
|
describe "notify_deployment/1" do
|
|
test "broadcasts :new_deployment over Aprsme.PubSub" do
|
|
:ok = Phoenix.PubSub.subscribe(Aprsme.PubSub, "deployment_events")
|
|
now = DateTime.utc_now()
|
|
|
|
assert :ok == DeploymentNotifier.notify_deployment(now)
|
|
|
|
assert_receive {:new_deployment, %{deployed_at: ^now}}, 1000
|
|
end
|
|
end
|
|
end
|