---
id: ATS-MBR-MEM-001
scope: CAP-MBR-MEM-001
product_area: membership
module: memberships
revision: 1
status: proposed
approved_by: null
approved_at: null
source_sha:
  services-membership: 5994c270e8a37a30f848e99ba5b5ee6b87c08893
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-MBR-MEM-001-01
    title: Invalid creation leaves no membership
    level: api
    proves:
      - BR-CAP-MBR-MEM-001-01
    preconditions: A prepared workspace contains the FAA membership configuration and the records needed for this case.
    steps: >-
      Submit requests with missing owner, reason or initial period, incompatible owner categories and inactive
      programs, then submit a valid request.
    expected: >-
      Invalid requests return validation failures identifying their problems; the successful request finds no
      residue from earlier failures.
    negative: true
    data_needs: 'FAA program, package, unit and membership fixtures from the integration setup.'
    bound_to: []
    provenance: proposed
    source: 'services-membership:tests/acceptance/memberships/MBR-ACC-0162.acceptance.ts#MBR-ACC-0162'
  - id: ATS-MBR-MEM-001-02
    title: A duplicate principal holding is rejected
    level: api
    proves:
      - BR-CAP-MBR-MEM-001-02
    preconditions: A prepared workspace contains the FAA membership configuration and the records needed for this case.
    steps: Create a principal membership and repeat creation for the same owner and program.
    expected: 'Only the first membership remains, and the duplicate refusal directs the caller to add a term.'
    negative: true
    data_needs: 'FAA program, package, unit and membership fixtures from the integration setup.'
    bound_to:
      - >-
        services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#refuses
        a second principal membership of the same owner in the program
    provenance: test
    source: >-
      services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#refuses
      a second principal membership of the same owner in the program
  - id: ATS-MBR-MEM-001-03
    title: Identity binding accepts only the required unit type
    level: api
    proves:
      - BR-CAP-MBR-MEM-001-02
      - BR-CAP-MBR-MEM-001-03
    preconditions: A prepared workspace contains the FAA membership configuration and the records needed for this case.
    steps: >-
      Create holdings for the same person in two different chapters, retry one chapter, then attempt an
      incompatible unit type and an absent identity unit.
    expected: >-
      Both distinct chapter holdings succeed; the duplicate chapter is refused as an existing holding, and
      incompatible or missing units fail validation.
    negative: true
    data_needs: 'FAA program, package, unit and membership fixtures from the integration setup.'
    bound_to:
      - >-
        services-membership:tests/acceptance/memberships/MBR-ACC-0187.acceptance.ts#MBR-ACC-0187: A chapter
        sells its own membership bound to the chapter: one per person per chapter, refused for a unit of the
        wrong type, invisible to another chapter's officer, and absent from the as-of answer's organizational
        units
    provenance: test
    source: >-
      services-membership:tests/acceptance/memberships/MBR-ACC-0187.acceptance.ts#MBR-ACC-0187: A chapter
      sells its own membership bound to the chapter: one per person per chapter, refused for a unit of the
      wrong type, invisible to another chapter's officer, and absent from the as-of answer's organizational
      units
  - id: ATS-MBR-MEM-001-04
    title: Creation rejects inactive or incompatible term configuration
    level: api
    proves:
      - BR-CAP-MBR-MEM-001-04
    preconditions: A prepared workspace contains the FAA membership configuration and the records needed for this case.
    steps: >-
      Attempt initial terms using an inactive type, an inactive package and a package attached to another
      type.
    expected: Each creation fails validation and identifies its type or package problem.
    negative: true
    data_needs: 'FAA program, package, unit and membership fixtures from the integration setup.'
    bound_to: []
    provenance: proposed
    source: 'services-membership:tests/acceptance/memberships/MBR-ACC-0180.acceptance.ts#MBR-ACC-0180'
  - id: ATS-MBR-MEM-001-05
    title: Package rules calculate omitted dates
    level: api
    proves:
      - BR-CAP-MBR-MEM-001-05
    preconditions: A prepared workspace contains the FAA membership configuration and the records needed for this case.
    steps: >-
      Create package-based initial terms without dates, supplying an effective date in one request and
      omitting it in another.
    expected: >-
      Each saved period matches the package calculation for the supplied effective date or workspace business
      date.
    negative: false
    data_needs: 'FAA program, package, unit and membership fixtures from the integration setup.'
    bound_to: []
    provenance: proposed
    source: 'services-membership:modules/memberships/services/operations/staff-operations.ts:datesOf'
  - id: ATS-MBR-MEM-001-06
    title: Concurrent overlap is rejected in both service and database
    level: api
    proves:
      - BR-CAP-MBR-MEM-001-06
    preconditions: A prepared workspace contains the FAA membership configuration and the records needed for this case.
    steps: >-
      Submit overlapping periods through two connections simultaneously, then insert an overlap directly
      without the service guard.
    expected: >-
      One concurrent write commits; the other identifies the winning term as its overlap, and the direct
      insert fails the database exclusion.
    negative: true
    data_needs: 'FAA program, package, unit and membership fixtures from the integration setup.'
    bound_to:
      - >-
        services-membership:modules/memberships/tests/integration/services/term-concurrency.integration.spec.ts#commits
        exactly one of the two terms
      - >-
        services-membership:modules/memberships/tests/integration/services/term-concurrency.integration.spec.ts#refuses
        the other with term_overlap, naming the term the first committed
      - >-
        services-membership:modules/memberships/tests/integration/services/term-concurrency.integration.spec.ts#is
        backed by the migration’s exclusion when the persistence check is bypassed
    provenance: test
    source: >-
      services-membership:modules/memberships/tests/integration/services/term-concurrency.integration.spec.ts#commits
      exactly one of the two terms
  - id: ATS-MBR-MEM-001-07
    title: Exclusive programs accept adjacency but reject shared days
    level: api
    proves:
      - BR-CAP-MBR-MEM-001-07
    preconditions: A prepared workspace contains the FAA membership configuration and the records needed for this case.
    steps: >-
      Give Kim a National membership; attempt overlapping Premium, adjacent Premium and membership in an
      unrelated Section.
    expected: The overlap identifies the conflicting holding and fails; the adjacent and unrelated holdings succeed.
    negative: true
    data_needs: 'FAA program, package, unit and membership fixtures from the integration setup.'
    bound_to:
      - >-
        services-membership:tests/acceptance/memberships/MBR-ACC-0171.acceptance.ts#MBR-ACC-0171: An owner
        never holds two tiers at once: overlapping programs of one exclusivity group are refused, adjacent and
        ungrouped ones allowed, pending terms count, and two simultaneous adds probe the lock
    provenance: test
    source: >-
      services-membership:tests/acceptance/memberships/MBR-ACC-0171.acceptance.ts#MBR-ACC-0171: An owner never
      holds two tiers at once: overlapping programs of one exclusivity group are refused, adjacent and
      ungrouped ones allowed, pending terms count, and two simultaneous adds probe the lock
  - id: ATS-MBR-MEM-001-08
    title: Creation uses the configured numbering source
    level: api
    proves:
      - BR-CAP-MBR-MEM-001-08
    preconditions: A prepared workspace contains the FAA membership configuration and the records needed for this case.
    steps: 'Create holdings under workspace, program and CRM numbering, including an owner without a CRM number.'
    expected: 'The assigned number follows the selected source, and CRM numbering refuses the owner lacking a number.'
    negative: false
    data_needs: 'FAA program, package, unit and membership fixtures from the integration setup.'
    bound_to:
      - >-
        services-membership:tests/acceptance/memberships/MBR-ACC-0186.acceptance.ts#MBR-ACC-0186: Membership
        numbers come from the program's numbering scope: one sequence for the workspace, a program's own
        sequence, or the owner's CRM number, which refuses an owner without one and repeats across programs
    provenance: test
    source: >-
      services-membership:tests/acceptance/memberships/MBR-ACC-0186.acceptance.ts#MBR-ACC-0186: Membership
      numbers come from the program's numbering scope: one sequence for the workspace, a program's own
      sequence, or the owner's CRM number, which refuses an owner without one and repeats across programs
  - id: ATS-MBR-MEM-001-09
    title: Enrolment preserves the reason and join-date origin
    level: api
    proves:
      - BR-CAP-MBR-MEM-001-09
    preconditions: A prepared workspace contains the FAA membership configuration and the records needed for this case.
    steps: Create one membership with an inferred join date and another with an explicit staff date.
    expected: >-
      Each saves a committed first term and enrolment reason; the join date and its origin distinguish the
      inferred date from the staff choice.
    negative: false
    data_needs: 'FAA program, package, unit and membership fixtures from the integration setup.'
    bound_to: []
    provenance: proposed
    source: >-
      services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#creates
      a membership with its committed term, its enrolment and its cache
  - id: ATS-MBR-MEM-001-10
    title: Import insertion and update have distinct event behavior
    level: api
    proves:
      - BR-CAP-MBR-MEM-001-10
    preconditions: A prepared workspace contains the FAA membership configuration and the records needed for this case.
    steps: >-
      Load memberships before periods after configuration, including a granting package and an organization
      owner; then upsert an existing period.
    expected: >-
      Insertion records an imported event; update adds no new imported event; status is refreshed without
      generating grants or organizational children.
    negative: false
    data_needs: 'FAA program, package, unit and membership fixtures from the integration setup.'
    bound_to: []
    provenance: proposed
    source: >-
      services-membership:modules/memberships/tests/integration/data-operations/membership-data-operations.integration.spec.ts#orders
      the loads as 10 §1 does: configuration, then memberships, then terms
  - id: ATS-MBR-MEM-001-11
    title: Import failures identify the affected item
    level: api
    proves:
      - BR-CAP-MBR-MEM-001-11
    preconditions: A prepared workspace contains the FAA membership configuration and the records needed for this case.
    steps: Prevalidate a malformed term field and attempt a period overlapping an existing term.
    expected: >-
      The invalid field is identified before writing, and the overlap receives an item-level conflict
      classification.
    negative: true
    data_needs: 'FAA program, package, unit and membership fixtures from the integration setup.'
    bound_to:
      - >-
        services-membership:modules/memberships/tests/integration/data-operations/membership-data-operations.integration.spec.ts#rejects
        a malformed item at prevalidation, naming its field
      - >-
        services-membership:modules/memberships/tests/integration/data-operations/membership-data-operations.integration.spec.ts#classifies
        an overlapping term as that item’s conflict, term_overlap
    provenance: test
    source: >-
      services-membership:modules/memberships/tests/integration/data-operations/membership-data-operations.integration.spec.ts#rejects
      a malformed item at prevalidation, naming its field
evidence:
  - >-
    services-membership at 5994c270e8a37a30f848e99ba5b5ee6b87c08893: the capability sources and the bound test
    files.
---

# Direct Membership Creation: Acceptance Test Set

## Coverage

| Rule | Scenario or Finding |
|---|---|
| `BR-CAP-MBR-MEM-001-01` | `ATS-MBR-MEM-001-01` |
| `BR-CAP-MBR-MEM-001-02` | `ATS-MBR-MEM-001-02` |
| `BR-CAP-MBR-MEM-001-03` | `ATS-MBR-MEM-001-03` |
| `BR-CAP-MBR-MEM-001-04` | `ATS-MBR-MEM-001-04` |
| `BR-CAP-MBR-MEM-001-05` | `ATS-MBR-MEM-001-05` |
| `BR-CAP-MBR-MEM-001-06` | `ATS-MBR-MEM-001-06` |
| `BR-CAP-MBR-MEM-001-07` | `ATS-MBR-MEM-001-07` |
| `BR-CAP-MBR-MEM-001-08` | `ATS-MBR-MEM-001-08` |
| `BR-CAP-MBR-MEM-001-09` | `ATS-MBR-MEM-001-09` |
| `BR-CAP-MBR-MEM-001-10` | `ATS-MBR-MEM-001-10` |
| `BR-CAP-MBR-MEM-001-11` | `ATS-MBR-MEM-001-11` |
| `BR-CAP-MBR-MEM-001-12` | no scenario: `FND-MBR-MEM-017` |
| `BR-CAP-MBR-MEM-001-13` | no scenario: `FND-MBR-MEM-016` |
