---
id: TST-PFM-SEC-212
title: Suspend revoke unit checks
kind: unit
product_area: platform
module: security
revision: 2
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - modules/security/tests/unit/services/invitations/suspend-revoke.spec.js
implements:
  - ATS-PFM-SEC-009-03
  - ATS-PFM-SEC-009-04
  - ATS-PFM-SEC-009-05
  - ATS-PFM-SEC-009-06
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 input fixtures and installed doubles.
assertion_evidence:
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#security
      capability: suspend, reinstate and revoke a membership
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#suspending
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#suspends
      the membership and revokes its outstanding invitations in one transaction, then disables the
      pool account
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#still
      reports the suspension when Cognito refuses, because the database change is already true
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#has
      no account to disable when the person was never provisioned, and says nothing about one
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#answers
      no flush when the flush could not be submitted, and says the caches expire within T instead
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#refuses
      a caller suspending their own account, writing nothing
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#answers
      a user outside the caller's scope and one that does not exist alike: not found
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#suspends
      in a customer that had no security administrator of its own before, which locks nobody out
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#refuses
      a suspension that would leave the customer with no security administrator, and suspends nobody
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#refuses
      when the row changed under it (the conditional update wrote nothing)
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#reinstating
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#re-enables
      the pool account and makes the membership active again
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#does
      not resurrect the invitations the suspension revoked: a fresh one is somebody’s deliberate act
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#refuses
      an account that is not suspended (a revoked one comes back as a fresh invitation)
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#still
      reports the reinstatement when Cognito refuses
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#revoking
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#ends
      the membership, its invitations and every assignment it held in one transaction
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#queues
      the disabling of the pool account instead of calling Cognito, so the answer never waits on it
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#queues
      it in the revocation’s own transaction, after the row is revoked
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#queues
      nothing when the person has no login at all, and says nothing about one
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#refuses
      a caller revoking their own account
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#refuses
      when the row changed under it, leaving the account enabled
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#refuses
      a revocation that would leave the customer with no security administrator
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js#records
      the refused revocation under the guard’s machine reason, which is what an access review reads
dependency_evidence: >-
  The file exercises its imported production code with controlled inputs. Source inspection
  identifies the test entry and assertions; it does not establish a live database, provider or
  deployed workflow.
evidence:
  - 'services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js'
  - >-
    Static review at the recorded source revision; executable results remain not-run and conformance
    remains not-verified.
binding_note: >-
  Each binding names the scenario to which this file contributes assertions. A binding is not a
  recorded pass and does not extend the file’s dependency boundary.
examiner: codex
examined_at: '2026-10-23'
final_text: OpenAI
dependency_review:
  provenance: test
  source: 'services-platform:modules/security/tests/unit/services/invitations/suspend-revoke.spec.js'
  explicit_no_doubles: false
  identified_double_boundaries: []
---
# Suspend revoke unit checks

## Verification Boundary

The file evaluates production helpers with controlled inputs in-process. The assertion references identify the source checks for suspend revoke.

## What This Suite Proves

The source assertions support the observations named in the bound scenarios. A scenario spanning multiple files must retain the other files’ contributions.

## What It Does Not Prove

This examination does not run the suite. Passing behavior, deployed conformance and the behavior of substituted dependencies require separate execution evidence.

## Real Dependencies and Test Doubles

The file exercises its imported production code with controlled inputs. Source inspection identifies the test entry and assertions; it does not establish a live database, provider or deployed workflow.

## Must Not Be Doubled

Keep the production helper, schema, matcher or declaration under examination real. Substituting the decision itself would remove the behavior the assertions exercise.
