aprs.me/test/support/channel_case.ex
Graham McIntire 2f09b590e2
Some checks are pending
Elixir CI / Build and test (push) Waiting to run
Elixir CI / Dialyzer (push) Waiting to run
Elixir CI / Build and Push Docker Image (push) Blocked by required conditions
fix: resolve all credo issues — 0 warnings, 0 refactoring, 0 readability issues
- Add ex_slop credo plugin with all 40 checks
- Remove DualKeyAccess patterns across codebase — atom-only access
- Fix LengthInGuard, LengthComparison, ListLast, ReduceMapPut in lib/
- Disable LengthComparison for test files
- Remove obvious comments and narrator comments (~50)
- Add missing aliases for fully-qualified modules
- Rewrite boilerplate docs in test/support
- Add normalize_keys helpers at API boundaries
2026-07-29 10:54:07 -05:00

30 lines
791 B
Elixir

defmodule AprsmeWeb.ChannelCase do
@moduledoc """
Test case for channel tests.
Relies on `Phoenix.ChannelTest` and imports helpers for building common
data structures and querying the data layer.
When the test case interacts with the database, the SQL sandbox is enabled
so changes are reverted at the end of every test. PostgreSQL users can
run database tests asynchronously by setting `use AprsmeWeb.ChannelCase, async: true`.
"""
use ExUnit.CaseTemplate
using do
quote do
import AprsmeWeb.ChannelCase
# Import conveniences for testing with channels
import Phoenix.ChannelTest
# The default endpoint for testing
@endpoint AprsmeWeb.Endpoint
end
end
setup tags do
Aprsme.DataCase.setup_sandbox(tags)
:ok
end
end