- Add jump_credo_checks ~> 0.4 with all 20 checks enabled - Fix all standard Credo issues: 139 @spec (113 done, 26 remain), 4 refactoring, 3 alias usage, 9 System.cmd env, 5 unsafe_to_atom, 2 max line length, 9 assert_receive timeout - Fix 170+ jump_credo_checks warnings: - 117 TopLevelAliasImportRequire: move nested alias/import to module top - 32 UseObanProWorker: switch to Oban.Pro.Worker - 4 DoctestIExExamples: add doctests / create test file - ~20 WeakAssertion: strengthen type-check assertions - Various ConditionalAssertion, AssertReceiveTimeout fixes - Exclude vendor/ from Credo analysis - Remaining: 175 warnings (mostly opinionated WeakAssertion, AvoidSocketAssignsInTest), 26 @spec annotations
20 lines
628 B
Elixir
20 lines
628 B
Elixir
defmodule Microwaveprop.Valkey.RedixAdapterTest do
|
|
use ExUnit.Case, async: true
|
|
|
|
alias Microwaveprop.Valkey.RedixAdapter
|
|
|
|
describe "command/3" do
|
|
test "delegates to Redix.command/3" do
|
|
# Without a real Redix process, the call raises or exits.
|
|
# Using catch_exit asserts the delegation reaches Redix and fails
|
|
# because :noproc is not a valid pid.
|
|
assert catch_exit(RedixAdapter.command(:noproc, ["GET", "k"], []))
|
|
end
|
|
end
|
|
|
|
describe "pipeline/3" do
|
|
test "delegates to Redix.pipeline/3" do
|
|
assert catch_exit(RedixAdapter.pipeline(:noproc, [["GET", "k"]], []))
|
|
end
|
|
end
|
|
end
|