---
id: TST-COM-ORD-128
title: The issue key
kind: unit
product_area: commerce
module: orders
revision: 1
status: draft
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
repository: services-commerce
files:
  - modules/orders/tests/unit/billing/issue-before-tender.spec.js
implements:
  - ATS-COM-ORD-006-02
environment: mock
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: 'The suite owns its in-memory inputs, scripted responses and rendered component state.'
evidence:
  - provenance: test
    source: 'services-commerce:modules/orders/tests/unit/billing/issue-before-tender.spec.js'
    test_cases:
      - 'is the billing key suffixed, the same on every retry'
      - issues a draft under the issue key and answers the issued invoice
      - asks nothing of an invoice that is not a draft (issued at creation) and answers it as it is
      - >-
        answers an issue Accounting answers still a draft as a refusal, invoice_not_issued, so the order is
        blocked and not tendered
      - 'passes no answer through as deferred, for the billing sweep to retry under the same keys'
      - 'issues the created draft: open, numbered in the PF series, still a pro forma'
      - replays the same issue key with the same answer and issues nothing twice
      - >-
        answers an invoice already issued under another key (409 invoice_not_draft) as issued, read back,
        never an error
      - 'answers no answer as deferred, nothing issued'
      - 'answers an unknown invoice as Accounting’s refusal, 404 not_found'
      - >-
        refuses a check on the created draft invoice_not_draft, then takes it on the issued pro forma and
        converts it
scenario_coverage:
  - scenario: ATS-COM-ORD-006-02
    test_cases:
      - >-
        answers an issue Accounting answers still a draft as a refusal, invoice_not_issued, so the order is
        blocked and not tendered
    scope: >-
      The cited cases exercise the scenario’s listed fixture outcomes; this register makes no verified
      conformance claim.
dependency_evidence:
  provenance: test
  source: 'services-commerce:modules/orders/tests/unit/billing/issue-before-tender.spec.js'
  declared_by_test: >-
    the port, the typed API, the fixture Accounting (Accounting's contract in process). Doubled: the execution
    context (the test one) and, for `issueCreatedInvoice`'s own branches, the port (a recorder).
---

# The issue key

## Verification Boundary

The unit suite checks the named contract or helper with controlled inputs.

## What This Suite Proves

The registered cases check the issue key with their fixture records and assertions. Scenario bindings name only the examples those cases exercise.

## What It Does Not Prove

A registered file supplies no run result or verified conformance by itself. Local fixtures do not establish deployed cross-service behavior or complete browser journeys.

## Real Dependencies and Test Doubles

Inputs and external responses are controlled in process; this suite establishes no deployed service behavior.

## Must Not Be Doubled

The named contract validation or component behavior under assertion must use its actual implementation.
