---
id: TST-ACC-BAT-057
title: Batch API batch postings
kind: api-lifecycle
product_area: accounting
module: batches
revision: 1
status: draft
product_intent: proposed
implementation_evidence: observed
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
repository: services-accounting
files:
  - modules/batches/tests/e2e/batch-postings.e2e.spec.js
implements:
  - ATS-ACC-BAT-012-01
  - ATS-ACC-BAT-013-01
  - ATS-ACC-BAT-013-02
  - ATS-ACC-BAT-016-01
  - ATS-ACC-BAT-016-02
  - ATS-ACC-BAT-016-05
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 5
isolation: >-
  The suite owns its test workspace or fixed integration fixtures in the
  prepared local database.
assertion_sources:
  - scenario: ATS-ACC-BAT-012-01
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#refuses
      a preview without the preview permission, 403
  - scenario: ATS-ACC-BAT-012-01
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#refuses
      a preview that names no batch, 400
  - scenario: ATS-ACC-BAT-013-01
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#refuses
      a posting without the posting permission, 403
  - scenario: ATS-ACC-BAT-013-01
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#refuses
      a posting that names no batch, 400
  - scenario: ATS-ACC-BAT-013-02
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#posts
      a batch as a durable job: the answer is the job, and the job posts the
      batch
  - scenario: ATS-ACC-BAT-016-01
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#refuses
      an unposting without the unposting permission, 403, and leaves the batch
      posted
  - scenario: ATS-ACC-BAT-016-02
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#unposts
      a posted batch as a durable job: the batch is open again and its entries
      are deleted
  - scenario: ATS-ACC-BAT-016-05
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#makes
      post, unpost and post of one batch three jobs through the routes, and
      posts the batch again
evidence:
  - provenance: observed
    source: 'services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js'
    note: >-
      The executable file is inspected at the pinned revision; duration is an
      unmeasured planning estimate.
  - provenance: documented
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#suite
      header
    note: >-
      Real: the composed handler (the dispatcher, the tenant access gate, the
      application access and licence steps), the mounted route
  - provenance: documented
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#suite
      header
    note: >-
      Doubled: the signing key pair, which is the run's own; Step Functions and
      the Lambda invocation, which the local runner and the
unbound_scope: null
---

# Batch API batch postings

## Verification Boundary

This suite invokes the composed Accounting dispatcher locally against the prepared database. It exercises request mapping, declared authorization checks and the asserted persistence results.

## What This Suite Proves

The assertions exercise batch api batch postings with controlled case inputs and compare permitted outcomes with their recorded refusals. The assertion anchors identify the supported portions of the bound scenarios.

## What It Does Not Prove

Local assertions do not establish deployment configuration, remote delivery guarantees, or unasserted lifecycle and concurrency paths.

## Real Dependencies and Test Doubles

PostgreSQL and the exercised persistence or accounting functions are real. Controlled clocks, imported test fixtures and any suite-specific doubles delimit the asserted behavior.

## Must Not Be Doubled

The database constraints, transaction boundaries and exercised accounting functions must remain real when qualifying the asserted persistence or generation behavior.
