---
id: TST-COM-FUL-048
title: Accounting adjustment commands
kind: unit
product_area: commerce
module: fulfillment
revision: 1
status: draft
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: services-commerce
files:
  - modules/fulfillment/tests/unit/adjustments/accounting-adjustment-commands.spec.js
implements:
  - ATS-COM-FUL-007-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: 'In-memory inputs, recorded calls and test-owned doubles; no shared customer records.'
evidence:
  - repository: services-commerce
    path: modules/fulfillment/tests/unit/adjustments/accounting-adjustment-commands.spec.js
    test_titles:
      - >-
        sends the credit memo to POST /credit_memos/{tenantId} with the key twice, the lines as
        money, and answers the memo’s id
      - >-
        sends every memo line’s quantity as Accounting’s contract has it, a decimal string (0230: a
        number was refused 400)
      - >-
        sends the fee invoice issued at once under the commerce source, the credit from the payment,
        its application and the refund executed, each to its route
      - >-
        answers a refusal as failed with Accounting’s code, retryable for the refusals a later
        attempt may change and permanent for a decline
      - >-
        throws when Accounting answers a server error or a document without an id, so the step stays
        submitted for the resume
      - >-
        names the Accounting provider when the environment names none, and the fixture when it says
        so (the suites, .mocharc.cjs)
    scenario_anchors:
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/accounting-adjustment-commands.spec.js#sends
        the credit memo to POST /credit_memos/{tenantId} with the key twice, the lines as money, and
        answers the memo’s id
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/accounting-adjustment-commands.spec.js#sends
        every memo line’s quantity as Accounting’s contract has it, a decimal string (0230: a number
        was refused 400)
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/accounting-adjustment-commands.spec.js#sends
        the fee invoice issued at once under the commerce source, the credit from the payment, its
        application and the refund executed, each to its route
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/accounting-adjustment-commands.spec.js#answers
        a refusal as failed with Accounting’s code, retryable for the refusals a later attempt may
        change and permanent for a decline
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/accounting-adjustment-commands.spec.js#throws
        when Accounting answers a server error or a document without an id, so the step stays
        submitted for the resume
---

# Accounting adjustment commands

## Verification Boundary

This suite checks accounting adjustment commands with controlled inputs and recorded dependencies. Its entry points remain within the process.

## What This Suite Proves

The bound scenarios identify the assertions this suite contributes. Source anchors retain the exact test cases; where a capability scenario has several contributing suites, a single binding does not imply that every branch runs here.

## What It Does Not Prove

Controlled inputs do not establish database enforcement, deployed integration or browser behavior. A recorded call is evidence about the adapter contract rather than a remote operation.

## Real Dependencies and Test Doubles

The imported logic is real; test inputs and dependency responses are controlled.

## Must Not Be Doubled

Keep the imported production logic and its request construction real. Record dependency calls and refusals rather than replacing the behavior being asserted.
