Accrue.Test (accrue v0.3.0)

Copy Markdown View Source

Public test helper facade for host applications.

use Accrue.Test imports the stable assertion helpers and action helpers intended for host DataCase/ConnCase modules.

Summary

Functions

Configures Accrue to use the in-memory Fake processor for the current test.

Configures Accrue to capture mail deliveries through Accrue.Mailer.Test.

Configures Accrue to capture PDF renders through Accrue.PDF.Test.

Functions

advance_clock(subject, duration)

See Accrue.Test.Clock.advance/2.

setup_fake_processor(context \\ [])

@spec setup_fake_processor(keyword() | map()) :: :ok | {:ok, keyword()}

Configures Accrue to use the in-memory Fake processor for the current test.

setup_mailer_test(context \\ [])

@spec setup_mailer_test(keyword() | map()) :: :ok | {:ok, keyword()}

Configures Accrue to capture mail deliveries through Accrue.Mailer.Test.

setup_pdf_test(context \\ [])

@spec setup_pdf_test(keyword() | map()) :: :ok | {:ok, keyword()}

Configures Accrue to capture PDF renders through Accrue.PDF.Test.

trigger_event(type, subject)

See Accrue.Test.Webhooks.trigger/2.