---
id: TST-PFM-MTD-041
title: association types
kind: integration
product_area: platform
module: metadata
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - modules/associations/tests/integration/services/persistence/association-types.integration.spec.js
implements:
  - ATS-PFM-MTD-017-01
  - ATS-PFM-MTD-017-02
  - ATS-PFM-MTD-017-03
  - ATS-PFM-MTD-017-04
  - ATS-PFM-MTD-017-05
  - ATS-PFM-MTD-017-06
  - ATS-PFM-MTD-017-07
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/integration/services/persistence/association-types.integration.spec.js
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#creates
    a type between two registered objects at version 1, with the defaults stated
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#records
    the create in the security trail, with the changed fields by name
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
    an id already in use in the tenant
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
    an id that is not a configuration id, writing nothing
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
    an object the registry does not have
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
    an objects.* object while no resolver answers for the objects application
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
    a cascade that would delete a native record, writing nothing
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
    a blank label
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#replaces
    the labels at the version read, moving the version and recording the fields changed
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
    a stale version and leaves the row as it was
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
    a change of cardinality, the shape of a type being immutable, and leaves the row as it was
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
    a change of the to object
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
    a change of dated
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
    turning the primary off while an open association of the type is primary
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
    a type the tenant does not have
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#deletes
    a type no association names, and says so
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#leaves
    no row behind for a deleted type
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#deactivates
    a type an association names instead of deleting it
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#records
    a delete and a deactivation in the security trail, each by its action
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
    a new association of a deactivated type
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
    to delete a type a custom object names as its owner type, naming the object
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#leaves
    the owner type and the object naming it as they were after the refusal
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
    deactivating the type of one object, naming it by its label and what to change first
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#names
    every object that uses the type as its owner, whatever its status, by label
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
    the delete of a type no link names, with the same message
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
    the retirement of a type a link names, which a delete would deactivate, and leaves it active
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#names
    only the archived object when it is the one left
  - >-
    services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#deactivates
    the type once no object names it as its owner, and revives it whatever objects name it
fixture_imports:
  - drizzle-orm
  - '@rhythmsoftware/macroservice-testing/refusals'
  - '@rhythmsoftware/macroservice-errors/errors'
  - ../../../../../security/db/security-audit-events.table
  - ../../../../db/association-types.table
  - ../../../../../custom-objects/db/custom-objects.table
  - ../../../../../../lib/records/snake-system-properties
  - '@rhythmsoftware/macroservice-testing/stage'
  - ../../../../services/persistence/association-types
  - ../../../../services/persistence/associations
  - ../../../../services/persistence/endpoints
  - ../../support
test_doubles: []
limitations: []
unmatched_specification: null
binding_assertions:
  - scenario: ATS-PFM-MTD-017-01
    provenance: test
    source:
      - >-
        services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
        an id already in use in the tenant
    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/integration/services/persistence/association-types.integration.spec.js#refuses
        an object the registry does not have
    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-03
    provenance: test
    source:
      - >-
        services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
        a cascade that would delete a native record, writing nothing
    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-04
    provenance: test
    source:
      - >-
        services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
        a change of cardinality, the shape of a type being immutable, and leaves the row as it was
      - >-
        services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
        a change of the to object
      - >-
        services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
        turning the primary off while an open association of the type is primary
      - >-
        services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
        a stale version and leaves the row as it was
    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-05
    provenance: test
    source:
      - >-
        services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#deletes
        a type no association names, and says so
      - >-
        services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#deactivates
        a type an association names instead of deleting it
      - >-
        services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
        a new association of a deactivated type
    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-06
    provenance: test
    source:
      - >-
        services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#refuses
        deactivating the type of one object, naming it by its label and what to change first
      - >-
        services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#names
        every object that uses the type as its owner, whatever its status, by label
      - >-
        services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#deactivates
        the type once no object names it as its owner, and revives it whatever objects name it
    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-07
    provenance: test
    source:
      - >-
        services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#records
        the create in the security trail, with the changed fields by name
      - >-
        services-platform:modules/associations/tests/integration/services/persistence/association-types.integration.spec.js#records
        a delete and a deactivation in the security trail, each by its action
    note: >-
      These references identify the assertions this suite contributes; bindings to additional suites remain
      part of the scenario’s proof.
---

# Association types

## Verification Boundary

This integration 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.
