Framework.Test.Operations.UserSignup (Framework v0.5.0)

View Source

Test operation for user signup - used by framework tests only. Applications should define their own operations.

Example Usage with i18n

# Context with user's locale preference
ctx = %{
  user: %{locale: "es-ES"},
  session: %{id: "sess_abc"}
}

input = %{
  email: "user@example.com",
  name: "María García"
}

{:ok, result} = Framework.Kernel.accept(
  Framework.Test.Operations.UserSignup,
  input,
  ctx,
  %{request_id: "req_123"}
)

# The operation can use:
# - ctx.locale (automatically set to "es-ES")
# - t(ctx, "welcome.message", name: input.name) for translations
# - Effects (email/webhook) will use es-ES templates automatically

Summary

Functions

plan(input, ctx)