Condukt.Sessions.Inbox.Conformance (Condukt v3.0.0)

Copy Markdown View Source

The tests every Condukt.Sessions.Inbox must pass, whatever it stores inputs in.

Use it in a test module of the inbox:

defmodule MyApp.SessionInboxTest do
  use ExUnit.Case, async: true
  use Condukt.Sessions.Inbox.Conformance, inbox: {MyApp.SessionInbox, []}
end

The :inbox option is the inbox the tests use. A setup that returns :inbox overrides it, for example to start one inbox per test. Each test uses session ids of its own, so tests may share an inbox and run concurrently. One test takes and puts from several processes at once, so run the suite where processes the test starts reach the inbox's storage.