---
id: TST-ACC-BAT-126
title: Batch rules batch assignment rules
kind: unit
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/unit/rules/batch-assignment-rules.spec.js
implements:
  - ATS-ACC-BAT-011-05
  - ATS-ACC-BAT-011-06
environment: mock
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: Each case owns its supplied rule inputs and test doubles.
assertion_sources:
  - scenario: ATS-ACC-BAT-011-05
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/unit/rules/batch-assignment-rules.spec.js#treats
      an empty criterion as any value
  - scenario: ATS-ACC-BAT-011-06
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/unit/rules/batch-assignment-rules.spec.js#answers
      the first matching rule by position, whatever order the rules are listed
      in
  - scenario: ATS-ACC-BAT-011-06
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/unit/rules/batch-assignment-rules.spec.js#requires
      every stated criterion to match
  - scenario: ATS-ACC-BAT-011-06
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/unit/rules/batch-assignment-rules.spec.js#matches
      a bank-account rule only for the same bank account
  - scenario: ATS-ACC-BAT-011-06
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/unit/rules/batch-assignment-rules.spec.js#does
      not match a stated payment type when the transaction has none
  - scenario: ATS-ACC-BAT-011-06
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/unit/rules/batch-assignment-rules.spec.js#answers
      the default, with no rule position, when there are no rules
evidence:
  - provenance: observed
    source: >-
      services-accounting:modules/batches/tests/unit/rules/batch-assignment-rules.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/unit/rules/batch-assignment-rules.spec.js#suite
      header
    note: 'Real: the decision function. Doubled: nothing (it is pure).'
unbound_scope: null
---

# Batch rules batch assignment rules

## Verification Boundary

This suite exercises the named rule functions with controlled inputs. Its boundary ends before persistent accounting and deployed execution.

## What This Suite Proves

The assertions exercise batch rules batch assignment rules 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

These checks do not prove transport authorization, transactional storage, scheduling delivery or the whole feature workflow.

## Real Dependencies and Test Doubles

The rule inputs and dependency callbacks are controlled by the case. Database, API dispatch and workflow delivery are outside this boundary.

## Must Not Be Doubled

Qualifying transactional integrity requires real storage and accounting execution beyond this rule-only suite.
