- Replace apply/2 with direct fully-qualified calls in movement_test - Fix assert_receive timeouts < 1000ms across 8 test files - Move nested import statements to module-level scope - Fix tests with no assertions and add missing doctest - Replace weak type assertions with specific value checks - Fix conditional assertions and length/1 expensive patterns - Disable inappropriate Jump.CredoChecks.AvoidSocketAssignsInTest - Fix tests not calling application code with credo:disable - Add various credo:disable comments for legitimate patterns
34 lines
1,007 B
Elixir
34 lines
1,007 B
Elixir
defmodule Aprsme.ApplicationTest do
|
|
use ExUnit.Case, async: false
|
|
|
|
describe "config_change/3" do
|
|
test "returns :ok" do
|
|
assert :ok = Aprsme.Application.config_change(%{}, %{}, [])
|
|
end
|
|
|
|
test "returns :ok with populated change maps" do
|
|
assert :ok =
|
|
Aprsme.Application.config_change(
|
|
%{secret_key_base: "x"},
|
|
%{},
|
|
[:removed_key]
|
|
)
|
|
end
|
|
end
|
|
|
|
describe "start/2" do
|
|
test "module is loaded and exports the Application behaviour callbacks" do
|
|
functions = Aprsme.Application.__info__(:functions)
|
|
assert {:start, 2} in functions
|
|
assert {:config_change, 3} in functions
|
|
end
|
|
end
|
|
|
|
describe "module compilation" do
|
|
test "Application module is loaded and has the Application behaviour" do
|
|
Code.ensure_loaded!(Aprsme.Application)
|
|
behaviours = Aprsme.Application.module_info(:attributes)[:behaviour] || []
|
|
assert Application in behaviours
|
|
end
|
|
end
|
|
end
|