---
id: TST-COM-ORD-052
title: The purchase eligibility of a checkout
kind: unit
product_area: commerce
module: orders
revision: 1
status: draft
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
repository: services-commerce
files:
  - modules/checkout/tests/unit/checkout/checkout-purchase-eligibility.spec.js
implements:
  - ATS-COM-ORD-003-04
  - ATS-COM-ORD-005-07
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/checkout/tests/unit/checkout/checkout-purchase-eligibility.spec.js'
    test_cases:
      - costs no evaluation for a product with no binding
      - reads no bindings for a checkout with no lines
      - >-
        asks once for every product of the lines, and evaluates the bound ones at display consistency with the
        slots the order has
      - 'reports an ineligible line with the engine''s sentence, naming the product and its item'
      - 'reports an indeterminate line, with its reason codes when the engine gave no sentence'
      - reports every bound line of an engine that cannot answer
      - 'lets the bindings read''s failure through, because the unbound cannot be told from the bound'
      - 'passes when every bound line is eligible, evaluated in the transaction at transactional consistency'
      - costs no evaluation when no line has a binding
      - 'refuses 409 product_not_eligible naming each refused product, its id, its name and the reason'
      - refuses when the engine cannot answer inside the transaction (closed)
      - >-
        does not swallow an error that is not an unavailable engine (a database error rolls the transaction
        back)
      - refuses a decision under review as not eligible
      - words the refusal after its first product and counts the rest
scenario_coverage:
  - scenario: ATS-COM-ORD-003-04
    test_cases:
      - costs no evaluation for a product with no binding
    scope: >-
      The cited cases exercise the scenario’s listed fixture outcomes; this register makes no verified
      conformance claim.
  - scenario: ATS-COM-ORD-005-07
    test_cases:
      - refuses a decision under review as not eligible
    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/checkout/tests/unit/checkout/checkout-purchase-eligibility.spec.js'
  declared_by_test: >-
    the check and the refusal. Doubled: the binding source and the engine (recording scripts), the execution
    context.
---

# The purchase eligibility of a checkout

## Verification Boundary

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

## What This Suite Proves

The registered cases check the purchase eligibility of a checkout 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.
