- 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
30 lines
791 B
Elixir
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
|