---
id: TST-PFM-MTD-036
title: associations
kind: api-lifecycle
product_area: platform
module: metadata
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - modules/associations/tests/e2e/associations.e2e.spec.js
implements:
  - ATS-PFM-MTD-017-01
  - ATS-PFM-MTD-017-02
  - ATS-PFM-MTD-018-01
  - ATS-PFM-MTD-018-06
  - ATS-PFM-MTD-018-10
  - ATS-PFM-MTD-018-11
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 5
isolation: >-
  Prepared integration database and the suite fixture records; fixture teardown restores or removes its own
  rows.
evidence:
  - 'services-platform:modules/associations/tests/e2e/associations.e2e.spec.js'
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers the public health route
    with no context
  - 'services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#creates a type'
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#reads a well-known type of the
    seed
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#lists the tenant’s types to one
    object, as one page
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#replaces a type’s labels with
    the record read back, at its version
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 409 to a replacement at
    a stale version
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#creates a type to an active
    custom object of the tenant
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 400 to a type of a draft
    custom object, naming it as not active
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 400 to a 64-character
    type id in the service’s id grammar
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 400 to a blank forward
    label as required
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 400 to an unknown
    cardinality, naming the three
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 400 to an unknown delete
    rule, naming the three
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 404 for a type the
    tenant does not have
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#deletes a type no association
    names
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 403 to a type create by
    a caller who may only read
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 401 to an anonymous read
    of the types
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#creates the association with the
    path’s contact as its from side, without the write path’s keys
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#lists it on the organization’s
    path in the reverse direction, naming the contact
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#lists it on the contact’s path
    in the forward direction, naming the organization
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 409 to a second open
    association of the type between the same records
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 400 to an association
    with a contact the tenant does not have, naming the field
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#lists a custom record’s
    associations, none while the record store holds no record
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 400 to a record’s
    associations of a draft custom object, naming it as not active
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 400 to an association
    made on an objects.* record
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#lists nothing of the tests
    tenant to a context of the other tenant, which the path cannot reach
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 403 to an association
    create by a caller who may only read
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#replaces the notes of the
    association read back, at its version
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 400 to a replacement
    that names another record
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#ends a dated association on the
    day given
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 409 to ending an
    association of an undated type
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#ends, rather than deletes, an
    open association of a dated type
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#deletes an association of an
    undated type
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 404 for an association
    the tenant does not have
  - >-
    services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#deactivates, rather than
    deletes, a type an association names
fixture_imports:
  - chai
  - ../../../../aws/api/platform-api-handler
  - '@rhythmsoftware/macroservice-testing/signed-context'
  - '@rhythmsoftware/macroservice-execution/tenant-time-zones'
  - '@rhythmsoftware/macroservice-testing/stage'
  - ../../../../db/seeds/integration/seed
  - ../../../tenants/services/persistence/tenants
  - ../../aws/api/associations.routes
  - ../../../custom-objects/services/persistence/custom-object-endpoints
  - ../integration/support
test_doubles: []
limitations: []
unmatched_specification: null
binding_assertions:
  - scenario: ATS-PFM-MTD-017-01
    provenance: test
    source:
      - >-
        services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 400 to a
        64-character type id in the service’s id grammar
      - >-
        services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 400 to a blank
        forward label as required
      - >-
        services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 400 to an unknown
        cardinality, naming the three
      - >-
        services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 400 to an unknown
        delete rule, naming the three
    note: >-
      These references identify the assertions this suite contributes; bindings to additional suites remain
      part of the scenario’s proof.
  - scenario: ATS-PFM-MTD-017-02
    provenance: test
    source:
      - >-
        services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#creates a type to an active
        custom object of the tenant
      - >-
        services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 400 to a type of a
        draft custom object, naming it as not active
    note: >-
      These references identify the assertions this suite contributes; bindings to additional suites remain
      part of the scenario’s proof.
  - scenario: ATS-PFM-MTD-018-01
    provenance: test
    source:
      - >-
        services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#creates the association with
        the path’s contact as its from side, without the write path’s keys
    note: >-
      These references identify the assertions this suite contributes; bindings to additional suites remain
      part of the scenario’s proof.
  - scenario: ATS-PFM-MTD-018-06
    provenance: test
    source:
      - >-
        services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 400 to a replacement
        that names another record
      - >-
        services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#replaces the notes of the
        association read back, at its version
    note: >-
      These references identify the assertions this suite contributes; bindings to additional suites remain
      part of the scenario’s proof.
  - scenario: ATS-PFM-MTD-018-10
    provenance: test
    source:
      - >-
        services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#lists it on the
        organization’s path in the reverse direction, naming the contact
      - >-
        services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#lists it on the contact’s
        path in the forward direction, naming the organization
      - >-
        services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#lists nothing of the tests
        tenant to a context of the other tenant, which the path cannot reach
    note: >-
      These references identify the assertions this suite contributes; bindings to additional suites remain
      part of the scenario’s proof.
  - scenario: ATS-PFM-MTD-018-11
    provenance: test
    source:
      - >-
        services-platform:modules/associations/tests/e2e/associations.e2e.spec.js#answers 403 to an
        association create by a caller who may only read
    note: >-
      These references identify the assertions this suite contributes; bindings to additional suites remain
      part of the scenario’s proof.
---

# Associations

## Verification Boundary

This API suite checks relationship definitions and links within the local test harness. The registered file and pinned revision define its boundary.

## What This Suite Proves

The bindings identify the detailed or feature scenarios whose outcomes have assertions in this suite. Original case references remain attached to the detailed scenarios so a reviewer can inspect the exact assertion. Assertions are evidence of implemented checks; no execution result is claimed.

## What It Does Not Prove

The register does not establish a current passing run or full specification conformance. Behavior outside the suite’s fixtures and assertions remains unverified.

## Real Dependencies and Test Doubles

The fixture uses PostgreSQL and the imported persistence or API code. The fixture imports identify the setup seams; this register makes no broader claim that dependencies are undoubled.

## Must Not Be Doubled

The operation under examination and its asserted stored outcomes must remain real within the declared harness. A fixture cannot replace the write, refusal or transactional effect that the bound scenario checks.
