---
id: TST-PFM-MTD-064
title: custom object records events
kind: integration
product_area: platform
module: metadata
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - >-
    modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js
implements:
  - ATS-PFM-MTD-015-01
  - ATS-PFM-MTD-015-02
  - ATS-PFM-MTD-015-03
  - ATS-PFM-MTD-015-06
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/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#platform.business_event_queue
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#writes
    exactly one ledger row, objects.record.created
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#carries
    the declared payload: the identifiers, the number with its prefix, the display name and the state
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#names
    the record as its subject, the object as its scope, version 1, and the caller as its actor
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#writes
    one queue row naming the event, for the dispatcher
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#writes
    it in the tenant of the write, and none in another
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes
    objects.record.updated naming the properties whose value changed, sorted
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes
    nothing for an update that changes no property’s value
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes
    nothing for an update of the external id alone, a system column
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#names,
    for a replacement, every property it cleared
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes
    nothing for a refused update, and leaves the create’s event alone
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes
    nothing for a refused create
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes
    nothing when the transaction that wrote the record rolls back, in the ledger or the queue
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes
    objects.record.published when a record becomes published, with its new state
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes
    objects.record.unpublished when a published record stops being published
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes
    objects.record.updated, naming no property, for a move between two unpublished states
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes
    nothing for a publication to the state the record is in
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes
    objects.record.archived and objects.record.restored
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes
    objects.record.deleted with the record as it was
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes
    the deletion of the record a cascade takes, with its own object’s number, and the association’s
fixture_imports:
  - drizzle-orm
  - '@rhythmsoftware/macroservice-testing/refusals'
  - '@rhythmsoftware/macroservice-testing/stage'
  - '@rhythmsoftware/macroservice-errors/errors'
  - '@rhythmsoftware/macroservice-testing/execution-context'
  - ../../../../../associations/services/persistence/associations
  - ../../../../db/business-events.table
  - ../../../../db/business-event-queue.table
  - ../../../../services/persistence/custom-object-records
  - ../../support
  - ../../business-events
test_doubles: []
limitations: []
unmatched_specification: null
binding_assertions:
  - scenario: ATS-PFM-MTD-015-01
    provenance: test
    source:
      - >-
        services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#writes
        exactly one ledger row, objects.record.created
      - >-
        services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes
        nothing when the transaction that wrote the record rolls back, in the ledger or the queue
    note: >-
      These references identify the assertions this suite contributes; bindings to additional suites remain
      part of the scenario’s proof.
  - scenario: ATS-PFM-MTD-015-02
    provenance: test
    source:
      - >-
        services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#carries
        the declared payload: the identifiers, the number with its prefix, the display name and the state
      - >-
        services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes
        objects.record.updated naming the properties whose value changed, sorted
    note: >-
      These references identify the assertions this suite contributes; bindings to additional suites remain
      part of the scenario’s proof.
  - scenario: ATS-PFM-MTD-015-03
    provenance: test
    source:
      - >-
        services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes
        nothing for an update that changes no property’s value
      - >-
        services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes
        nothing for an update of the external id alone, a system column
      - >-
        services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes
        nothing for a publication to the state the record is in
    note: >-
      These references identify the assertions this suite contributes; bindings to additional suites remain
      part of the scenario’s proof.
  - scenario: ATS-PFM-MTD-015-06
    provenance: test
    source:
      - >-
        services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes
        objects.record.deleted with the record as it was
      - >-
        services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes
        the deletion of the record a cascade takes, with its own object’s number, and the association’s
    note: >-
      These references identify the assertions this suite contributes; bindings to additional suites remain
      part of the scenario’s proof.
---

# Custom object records events

## Verification Boundary

This integration suite checks custom objects and records 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.
