Accrue.Auth.Mock (accrue v0.3.0)

Copy Markdown View Source

Process-local Accrue.Auth adapter for host test suites.

This module is intentionally not wired as a default adapter. Host tests may configure it explicitly when they need a named, async-safe auth seam.

Summary

Functions

Clears the mock current user from the calling process.

Stores the mock current user in the calling process.

Functions

clear_current_user()

@spec clear_current_user() :: :ok

Clears the mock current user from the calling process.

put_current_user(user)

@spec put_current_user(Accrue.Auth.user()) :: :ok

Stores the mock current user in the calling process.