---
id: TST-PFM-NOT-064
title: owned templates
kind: integration
product_area: platform
module: notifications
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - >-
    modules/communications/tests/integration/services/templates/owned-templates.integration.spec.js
implements:
  - ATS-PFM-NOT-016-08
  - ATS-PFM-NOT-016-09
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 5
isolation: >-
  Suite-owned records in the prepared integration workspaces; seeded workspace
  identities remain shared fixtures.
assertion_bindings:
  - scenario: ATS-PFM-NOT-016-08
    suite: TST-PFM-NOT-064
    assertions:
      - >-
        services-platform:modules/communications/tests/integration/services/templates/owned-templates.integration.spec.js#creates
        the record’s template and publishes version 1
      - >-
        services-platform:modules/communications/tests/integration/services/templates/owned-templates.integration.spec.js#keeps
        every field the partial content left out
      - >-
        services-platform:modules/communications/tests/integration/services/templates/owned-templates.integration.spec.js#clears
        an optional field when the screen sends null for it
      - >-
        services-platform:modules/communications/tests/integration/services/templates/owned-templates.integration.spec.js#publishes
        no new version
      - >-
        services-platform:modules/communications/tests/integration/services/templates/owned-templates.integration.spec.js#writes
        nothing for the refused first save: the record still owns none
      - >-
        services-platform:modules/communications/tests/integration/services/templates/owned-templates.integration.spec.js#writes
        nothing: the record owns no template afterwards
      - >-
        services-platform:modules/communications/tests/integration/services/templates/owned-templates.integration.spec.js#answers
        a second clear harmlessly, so a repeated record save is safe
      - >-
        services-platform:modules/communications/tests/integration/services/templates/owned-templates.integration.spec.js#ends
        with one template for the owner, because the unique index refuses the
        second insert
  - scenario: ATS-PFM-NOT-016-09
    suite: TST-PFM-NOT-064
    assertions:
      - >-
        services-platform:modules/communications/tests/integration/services/templates/owned-templates.integration.spec.js#drops
        the purpose and the owner from the body before the operation sees them
      - >-
        services-platform:modules/communications/tests/integration/services/templates/owned-templates.integration.spec.js#leaves
        the template owned by the record that composed it
      - >-
        services-platform:modules/communications/tests/integration/services/templates/owned-templates.integration.spec.js#allows
        archiving it, which is the same act as clearing it
evidence:
  - >-
    services-platform:modules/communications/tests/integration/services/templates/owned-templates.integration.spec.js
  - The file and referenced assertion titles exist at the pinned commit.
dependency_evidence:
  - >-
    Real: PostgreSQL, the owned-template service, the template service it
    publishes through, the renderer and acceptance.
  - >-
    Doubled: the dispatcher's nudge (recorded, never invoked). Never doubled:
    the database, its unique index, or the services.
---

# owned templates

## Verification Boundary

This suite exercises the local services and prepared PostgreSQL database. API lifecycle cases use signed test contexts through the real route handler; they do not invoke the deployed gateway.

## What This Suite Proves

Its cases exercise save one record-owned template with partial updates; preserve owned-template purpose and owner.

The registered scenario bindings identify the assertions this executable file contributes. They retain individual test references so that a composite scenario does not become a claim of complete execution by one file.

## What It Does Not Prove

Local outcomes do not prove deployed queues, external provider acceptance, production credentials or complete browser behavior. No fresh execution or conformance result is claimed.

## Real Dependencies and Test Doubles

The communication fixtures use real PostgreSQL and module logic. Shared support records queue and transport calls and stores objects in memory; sender provisioning substitutes a provider identity store. Signed API contexts replace the authorizer key in API suites.

## Must Not Be Doubled

Database constraints, workspace policy, state guards and the service operation under test must remain real. Recording a provider or queue call must not replace the submission, claim or outcome logic being checked.
