# `Accrue.Test.PdfAssertions`
[🔗](https://github.com/szTheory/accrue/blob/accrue-v0.3.1/lib/accrue/test/pdf_assertions.ex#L1)

ExUnit-style assertions for `Accrue.PDF.Test` render captures (D-34).
Symmetric with `Accrue.Test.MailerAssertions`.

## Usage

    use Accrue.Test.PdfAssertions
    # or
    import Accrue.Test.PdfAssertions

## Matching

- `:invoice_id` -> `opts[:invoice_id] || opts["invoice_id"]`
- `:contains` (string) -> `String.contains?(html, value)`
- `:matches` (1-arity fn) -> predicate escape hatch on normalized render data
- `:opts_include` (keyword) -> subset match on the opts keyword list

All helpers consume `{:pdf_rendered, html, opts}` tuples sent by
`Accrue.PDF.Test.render/2`. Messages are process-local; `async: true`
is safe. Cross-process owner or global capture modes are intentionally
not the default; if a host test needs them, name that mode explicitly
and treat it with the same caution as Mox or Swoosh global mode.

# `assert_pdf_rendered`
*macro* 

Asserts that a PDF was rendered (via `Accrue.PDF.Test`) matching the
given `matchers`. Flunks if no matching message is received within
`timeout` (default 100ms).

# `refute_pdf_rendered`
*macro* 

Refutes that a PDF render matching `matchers` occurred within `timeout`
(default 100ms). Non-matching render messages are ignored.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
