Generates ExUnit tests for every :rest entity's Phoenix
controller. One test file per entity, one describe per action,
one test per happy/unhappy path. Uses the standard
Phoenix.ConnTest stack and assumes *.ConnCase under
test/support/conn_case.ex.
Tests are CI-ready: mix test picks them up, no extra
configuration required beyond the consumer app's existing Phoenix
test setup. Fixture hooks are marked # TODO: because the
generator can't infer the app's factories.
Returns a list of {path, source} tuples. Custom code below the
# --- CUSTOM --- marker is preserved on regeneration.
Summary
Functions
Generate a test file per :rest entity in the domain.
Generate a single entity's controller test file.
Path to the generated controller test file.
Functions
@spec render_all( Caravela.Schema.Domain.t(), keyword() ) :: [{String.t(), String.t()}]
Generate a test file per :rest entity in the domain.
@spec render_entity(Caravela.Schema.Domain.t(), Caravela.Schema.Entity.t(), keyword()) :: {String.t(), String.t()}
Generate a single entity's controller test file.
@spec test_file_path(Caravela.Schema.Domain.t(), Caravela.Schema.Entity.t()) :: String.t()
Path to the generated controller test file.