Skip to content

ATS-MBR-MEM-001Record a membership and its first term without a purchase: Capability Test Specification

Markdown

ATS-MBR-MEM-001

Record a membership and its first term without a purchase: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaMembershipModuleMemberships, Applications and Membership BillingRevision2

Read atservices-membership 5994c270react-console baf6dae3

Coverage

  • Rule gap: FND-MBR-MEM-083
  • Transition gap: FND-MBR-MEM-083
  • Validation covered
  • Permission covered
  • Edge gap: FND-MBR-MEM-083
  • Failure covered
  • Boundary covered
  • Concurrency covered
  • Invariant gap: FND-MBR-MEM-083
  • Interaction covered

Test Scenarios

16 scenarios proving CAP-MBR-MEM-001; 8 bound to an existing test.

01 Invalid creation leaves no membershipvalidationapinegativeproposed
Proves
BR-CAP-MBR-MEM-001-01
Preconditions
A prepared workspace contains the FAA membership configuration and the records needed for this case.
Steps
[ { "do": "Submit requests with missing owner, reason or initial period, incompatible owner categories and inactive programs, then submit a valid request.", "expect": "Invalid requests return validation failures identifying their problems; the successful request finds no residue from earlier failures.", "provenance": "proposed", "source": "services-membership:tests/acceptance/memberships/MBR-ACC-0162.acceptance.ts#MBR-ACC-0162" } ]
Expected
Invalid requests return validation failures identifying their problems; the successful request finds no residue from earlier failures.
Data
FAA program, package, unit and membership fixtures from the integration setup.
Source
services-membership:tests/acceptance/memberships/MBR-ACC-0162.acceptance.ts#MBR-ACC-0162
02 A duplicate principal holding is rejectedinvariantapinegativetest
Proves
BR-CAP-MBR-MEM-001-02 INV-DOM-MBR-MEM-001-01
Preconditions
A prepared workspace contains the FAA membership configuration and the records needed for this case.
Steps
[ { "do": "Create a principal membership and repeat creation for the same owner and program.", "expect": "Only the first membership remains, and the duplicate refusal directs the caller to add a term.", "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" ] } ]
Expected
Only the first membership remains, and the duplicate refusal directs the caller to add a term.
Data
FAA program, package, unit and membership fixtures from the integration setup.
Bound to
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
03 Identity binding accepts only the required unit typevalidationapinegativetest
Proves
BR-CAP-MBR-MEM-001-02 BR-CAP-MBR-MEM-001-03 INV-DOM-MBR-MEM-001-06
Preconditions
A prepared workspace contains the FAA membership configuration and the records needed for this case.
Steps
[ { "do": "Create holdings for the same person in two different chapters, retry one chapter, then attempt an incompatible unit type and an absent identity unit.", "expect": "Both distinct chapter holdings succeed; the duplicate chapter is refused as an existing holding, and incompatible or missing units fail validation.", "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" ] } ]
Expected
Both distinct chapter holdings succeed; the duplicate chapter is refused as an existing holding, and incompatible or missing units fail validation.
Data
FAA program, package, unit and membership fixtures from the integration setup.
Bound to
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
04 Creation rejects inactive or incompatible term configurationvalidationapinegativeproposed
Proves
BR-CAP-MBR-MEM-001-04
Preconditions
A prepared workspace contains the FAA membership configuration and the records needed for this case.
Steps
[ { "do": "Attempt initial terms using an inactive type, an inactive package and a package attached to another type.", "expect": "Each creation fails validation and identifies its type or package problem.", "provenance": "proposed", "source": "services-membership:tests/acceptance/memberships/MBR-ACC-0180.acceptance.ts#MBR-ACC-0180" } ]
Expected
Each creation fails validation and identifies its type or package problem.
Data
FAA program, package, unit and membership fixtures from the integration setup.
Source
services-membership:tests/acceptance/memberships/MBR-ACC-0180.acceptance.ts#MBR-ACC-0180
05 Package rules calculate omitted datesruleapiproposed
Proves
BR-CAP-MBR-MEM-001-05
Preconditions
A prepared workspace contains the FAA membership configuration and the records needed for this case.
Steps
[ { "do": "Create package-based initial terms without dates, supplying an effective date in one request and omitting it in another.", "expect": "Each saved period matches the package calculation for the supplied effective date or workspace business date.", "provenance": "proposed", "source": "services-membership:modules/memberships/services/operations/staff-operations.ts:datesOf" } ]
Expected
Each saved period matches the package calculation for the supplied effective date or workspace business date.
Data
FAA program, package, unit and membership fixtures from the integration setup.
Source
services-membership:modules/memberships/services/operations/staff-operations.ts:datesOf
06 Concurrent overlap is rejected in both service and databaseconcurrencyapinegativetest
Proves
BR-CAP-MBR-MEM-001-06 INV-DOM-MBR-MEM-002-01
Preconditions
A prepared workspace contains the FAA membership configuration and the records needed for this case.
Steps
[ { "do": "Submit overlapping periods through two connections simultaneously, then insert an overlap directly without the service guard.", "expect": "One concurrent write commits; the other identifies the winning term as its overlap, and the direct insert fails the database exclusion.", "provenance": "test", "source": [ "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" ] } ]
Expected
One concurrent write commits; the other identifies the winning term as its overlap, and the direct insert fails the database exclusion.
Data
FAA program, package, unit and membership fixtures from the integration setup.
Bound to
Source
services-membership:modules/memberships/tests/integration/services/term-concurrency.integration.spec.ts#commits exactly one of the two terms
07 Exclusive programs accept adjacency but reject shared daysboundaryapinegativetest
Proves
BR-CAP-MBR-MEM-001-07
Preconditions
A prepared workspace contains the FAA membership configuration and the records needed for this case.
Steps
[ { "do": "Give Kim a National membership; attempt overlapping Premium, adjacent Premium and membership in an unrelated Section.", "expect": "The overlap identifies the conflicting holding and fails; the adjacent and unrelated holdings succeed.", "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" ] } ]
Expected
The overlap identifies the conflicting holding and fails; the adjacent and unrelated holdings succeed.
Data
FAA program, package, unit and membership fixtures from the integration setup.
Bound to
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
08 Creation uses the configured numbering sourceruleapitest
Proves
BR-CAP-MBR-MEM-001-08
Preconditions
A prepared workspace contains the FAA membership configuration and the records needed for this case.
Steps
[ { "do": "Create holdings under workspace, program and CRM numbering, including an owner without a CRM number.", "expect": "The assigned number follows the selected source, and CRM numbering refuses the owner lacking a number.", "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" ] } ]
Expected
The assigned number follows the selected source, and CRM numbering refuses the owner lacking a number.
Data
FAA program, package, unit and membership fixtures from the integration setup.
Bound to
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
09 Enrolment preserves the reason and join-date origintransitionapiproposed
Proves
BR-CAP-MBR-MEM-001-09
Preconditions
A prepared workspace contains the FAA membership configuration and the records needed for this case.
Steps
[ { "do": "Create one membership with an inferred join date and another with an explicit staff date.", "expect": "Each saves a committed first term and enrolment reason; the join date and its origin distinguish the inferred date from the staff choice.", "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" } ]
Expected
Each saves a committed first term and enrolment reason; the join date and its origin distinguish the inferred date from the staff choice.
Data
FAA program, package, unit and membership fixtures from the integration setup.
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
10 Import insertion and update have distinct event behaviorinteractionapiproposed
Proves
BR-CAP-MBR-MEM-001-10
Preconditions
A prepared workspace contains the FAA membership configuration and the records needed for this case.
Steps
[ { "do": "Load memberships before periods after configuration, including a granting package and an organization owner; then upsert an existing period.", "expect": "Insertion records an imported event; update adds no new imported event; status is refreshed without generating grants or organizational children.", "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" } ]
Expected
Insertion records an imported event; update adds no new imported event; status is refreshed without generating grants or organizational children.
Data
FAA program, package, unit and membership fixtures from the integration setup.
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
11 Import failures identify the affected itemfailureapinegativetest
Proves
BR-CAP-MBR-MEM-001-11
Preconditions
A prepared workspace contains the FAA membership configuration and the records needed for this case.
Steps
[ { "do": "Prevalidate a malformed term field and attempt a period overlapping an existing term.", "expect": "The invalid field is identified before writing, and the overlap receives an item-level conflict classification.", "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", "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" ] } ]
Expected
The invalid field is identified before writing, and the overlap receives an item-level conflict classification.
Data
FAA program, package, unit and membership fixtures from the integration setup.
Bound to
Source
services-membership:modules/memberships/tests/integration/data-operations/membership-data-operations.integration.spec.ts#rejects a malformed item at prevalidation, naming its field
12 Extend the holding after duplicate creation is refusedinteractionapinegativeproposed
Proves
BR-CAP-MBR-MEM-001-02 BR-CAP-MBR-MEM-002-02
Preconditions
One person already holds a principal membership.
Steps
[ { "do": "Repeat creation, then add an undated staff renewal to the existing holding.", "expect": "The refused creation adds no holding; the renewal adds a period to the original holding.", "provenance": "proposed", "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", "services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#adds a renewal continuing the latest term when no dates are given" ] } ]
Expected
The refused creation adds no holding; the renewal adds a period to the original holding.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
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,services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#adds a renewal continuing the latest term when no dates are given
13 Keep enrolment and package grants in one commitinteractionapiproposed
Proves
BR-CAP-MBR-MEM-001-09 BR-CAP-MBR-MEM-006-01
Preconditions
A new person selects a granting package.
Steps
[ { "do": "Create the source membership, then inspect the source and granted holdings after commit; repeat with a refused creation.", "expect": "The successful save contains source and grant periods; the refused save contains neither.", "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", "services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#creates the granted membership and term of a package grant in the same transaction" ] } ]
Expected
The successful save contains source and grant periods; the refused save contains neither.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
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,services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#creates the granted membership and term of a package grant in the same transaction
14 Refuse enrolment when its chapter selection is invalidinteractionapinegativeproposed
Proves
BR-CAP-MBR-MEM-001-01 BR-CAP-MBR-MEM-007-03
Preconditions
A new person selects a package requiring one chapter.
Steps
[ { "do": "Create without a chapter, then create with an allowed chapter and inspect holdings and affiliations.", "expect": "The first attempt leaves no holding; the second produces one holding with the selected chapter.", "provenance": "proposed", "source": [ "services-membership:tests/acceptance/memberships/MBR-ACC-0162.acceptance.ts#MBR-ACC-0162", "services-membership:modules/memberships/tests/unit/unit-rules.spec.ts#refuses fewer affiliations of a type than its minimum from the day the operation takes effect" ] } ]
Expected
The first attempt leaves no holding; the second produces one holding with the selected chapter.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Source
services-membership:tests/acceptance/memberships/MBR-ACC-0162.acceptance.ts#MBR-ACC-0162,services-membership:modules/memberships/tests/unit/unit-rules.spec.ts#refuses fewer affiliations of a type than its minimum from the day the operation takes effect
15 Require the staff creation grantpermissionapinegativetest
Proves
BR-CAP-MBR-MEM-001-01
Preconditions
Staff and a read-only colleague submit the same valid enrolment.
Steps
[ { "do": "Create as staff, repeat as the read-only colleague, then count the contact’s memberships.", "expect": "Staff creation succeeds; the colleague receives a missing-permission refusal and only one holding exists.", "provenance": "test", "source": "services-membership:tests/acceptance/memberships/MBR-ACC-0172.acceptance.ts" } ]
Expected
Staff creation succeeds; the colleague receives a missing-permission refusal and only one holding exists.
Data
Suite-owned workspaces, annual membership fixtures, signed staff and restricted contexts.
Bound to
Source
services-membership:tests/acceptance/memberships/MBR-ACC-0172.acceptance.ts
16 Confine enrolment to the caller’s workspaceboundaryapinegativetest
Proves
BR-CAP-MBR-MEM-001-01
Preconditions
Two isolated workspaces contain signed administrators and a holding in the first workspace.
Steps
[ { "do": "Use the second administrator against the first workspace, then read the first holding through the second workspace path.", "expect": "The cross-workspace write is refused at the workspace boundary, the foreign read is not found, and the second workspace receives no holding.", "provenance": "test", "source": "services-membership:tests/acceptance/memberships/MBR-ACC-0172.acceptance.ts" } ]
Expected
The cross-workspace write is refused at the workspace boundary, the foreign read is not found, and the second workspace receives no holding.
Data
Suite-owned workspaces, annual membership fixtures, signed staff and restricted contexts.
Bound to
Source
services-membership:tests/acceptance/memberships/MBR-ACC-0172.acceptance.ts

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.