Skip to content

ATS-MBR-STR-006Maintain a unit’s identity and local details: Capability Test Specification

Markdown

ATS-MBR-STR-006

Maintain a unit’s identity and local details: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaMembershipModuleOrganizational Structure, Membership Configuration and TermsRevision2

Read atservices-membership 5994c270react-console baf6dae3

Coverage

  • Rule covered
  • Transition not-applicable
  • Validation covered
  • Permission covered
  • Edge covered
  • Failure gap: FND-MBR-STR-059
  • Boundary covered
  • Concurrency covered
  • Invariant covered
  • Interaction covered

Test Scenarios

12 scenarios proving CAP-MBR-STR-006; 5 bound to an existing test.

01 Unit codes distinguish records and reject malformed valuesvalidationapinegativetest
Proves
BR-CAP-MBR-STR-006-01 INV-DOM-MBR-STR-002-01
Preconditions
An isolated Membership-licensed workspace contains the relevant records, with caller permissions selected for the case.
Steps
Attempt duplicate unit codes and a code containing uppercase letters.
Expected
Duplicate and malformed cases fail rather than creating another unit.
Data
The FAA example records or equivalent records prepared within the isolated workspace.
Bound to
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › the refusals › refuses a code the tenant already has
Source
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › the refusals › refuses a code the tenant already has
02 Detail replacement cannot relocate or reclassifyinvariantapitest
Proves
BR-CAP-MBR-STR-006-02 INV-DOM-MBR-STR-002-02
Preconditions
An isolated Membership-licensed workspace contains the relevant records, with caller permissions selected for the case.
Steps
Include changed parent, kind and status alongside valid replacement details.
Expected
The saved unit retains its structural fields.
Data
The FAA example records or equivalent records prepared within the isolated workspace.
Bound to
services-membership:tests/acceptance/structure/MBR-ACC-0032.acceptance.ts#MBR-ACC-0032 a client that thinks PUT is a patch, and a unit deleted behind the service
Source
services-membership:tests/acceptance/structure/MBR-ACC-0032.acceptance.ts#MBR-ACC-0032 a client that thinks PUT is a patch, and a unit deleted behind the service
03 E-mail normalization and validation are explicitvalidationapinegativeproposed
Proves
BR-CAP-MBR-STR-006-03
Preconditions
An isolated Membership-licensed workspace contains the relevant records, with caller permissions selected for the case.
Steps
Compare a spaced mixed-case e-mail value with an invalid address.
Expected
The valid value returns normalized and the invalid value is refused.
Data
The FAA example records or equivalent records prepared within the isolated workspace.
Source
services-membership:modules/structure/services/persistence/organizational-units.ts:attributeValues
04 Geographic coordinates stay within their rangesboundaryapinegativeproposed
Proves
BR-CAP-MBR-STR-006-04
Preconditions
An isolated Membership-licensed workspace contains the relevant records, with caller permissions selected for the case.
Steps
Attempt latitude above 90 and longitude below minus 180.
Expected
Each invalid coordinate fails and preserves the earlier unit.
Data
The FAA example records or equivalent records prepared within the isolated workspace.
Source
services-membership:modules/structure/db/organizational-units.table.ts:organizational_units_latitude_check
05 Custom values validate and round-tripvalidationapinegativetest
Proves
BR-CAP-MBR-STR-006-06 INV-DOM-MBR-STR-002-08
Preconditions
An isolated Membership-licensed workspace contains the relevant records, with caller permissions selected for the case.
Steps
Save, amend and clear configured values, then try unknown, archived and invalid fields.
Expected
Allowed values return as saved and the invalid cases identify their fields.
Data
The FAA example records or equivalent records prepared within the isolated workspace.
Bound to
services-membership:tests/acceptance/structure/MBR-ACC-0031.acceptance.ts#MBR-ACC-0031 every kind of custom field on a chapter
Source
services-membership:tests/acceptance/structure/MBR-ACC-0031.acceptance.ts#MBR-ACC-0031 every kind of custom field on a chapter
06 Replacement defaults differ from custom-value omissionconcurrencyapinegativetest
Proves
BR-CAP-MBR-STR-006-05
Preconditions
An isolated Membership-licensed workspace contains the relevant records, with caller permissions selected for the case.
Steps
Omit phone and visibility in a current replacement, then reuse the previous version.
Expected
Phone clears and visibility defaults to visible, omitted custom values remain and the stale write fails.
Data
The FAA example records or equivalent records prepared within the isolated workspace.
Bound to
services-membership:tests/acceptance/structure/MBR-ACC-0007.acceptance.ts#MBR-ACC-0007 replacing a chapter: whole row for columns, patch for custom fields
Source
services-membership:tests/acceptance/structure/MBR-ACC-0007.acceptance.ts#MBR-ACC-0007 replacing a chapter: whole row for columns, patch for custom fields
07 History is attributable and protected from direct writinginvariantapitest
Proves
BR-CAP-MBR-STR-006-08 INV-DOM-MBR-STR-001-07
Preconditions
An isolated Membership-licensed workspace contains the relevant records, with caller permissions selected for the case.
Steps
Create, replace and relocate a unit, then attempt an application-role write to its versions.
Expected
Retained versions identify actors and the direct history write fails.
Data
The FAA example records or equivalent records prepared within the isolated workspace.
Bound to
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › the versions › writes a version of the unit for its creation, its update and its move, each with the actor of its context
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › the versions › refuses the application role a direct write to a version table
Source
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › the versions › writes a version of the unit for its creation, its update and its move, each with the actor of its context
08 Custom values appear only in detailed readsruleapiproposed
Proves
BR-CAP-MBR-STR-006-07
Preconditions
An isolated workspace contains the records and current versions needed for the case.
Steps
Create a unit with one configured custom value; read its details, flat list and branch tree.
Expected
The detail answer contains the value and ordinary collection answers omit it.
Data
Separate fixture records for the accepted and refused operations.
Source
services-membership:modules/structure/services/persistence/organizational-units.ts:updateOrganizationalUnit
09 Welcome selection remains a stored choiceedgeapinegativeproposed
Proves
BR-CAP-MBR-STR-006-09
Preconditions
An isolated workspace contains the records and current versions needed for the case.
Steps
Save a unit with a welcome-template selection and then replace it with another selection.
Expected
Each detail read returns the selected template; this case makes no claim that a message is sent.
Data
Separate fixture records for the accepted and refused operations.
Source
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › the versions › writes a version of the unit for its creation, its update and its move, each with the actor of its context
10 Unit details and organization history keep separate versionsinteractionapiproposed
Proves
BR-CAP-MBR-STR-006-08 BR-CAP-MBR-STR-007-09
Preconditions
An isolated workspace contains the records and current versions needed for the case.
Steps
Save a unit detail change and then end one of its organization links; inspect both histories.
Expected
Unit versions describe the detail edit and link versions describe the ending with their respective actors.
Data
Separate fixture records for the accepted and refused operations.
Source
services-membership:modules/structure/services/persistence/organizational-units.ts:getOrganizationalUnit,services-membership:docs/migrations/structure/README.md#Tables and migrations
11 Finance replacement preserves unit structureinteractionapiproposed
Proves
BR-CAP-MBR-STR-006-02 BR-CAP-MBR-STR-008-06
Preconditions
An isolated workspace contains the records and current versions needed for the case.
Steps
Save financial settings, replace unit contact details and then replace financial settings at their own version.
Expected
The settings use their own version and the unit retains its kind and placement.
Data
Separate fixture records for the accepted and refused operations.
Source
services-membership:modules/structure/services/persistence/organizational-units.ts:updateOrganizationalUnit,services-membership:modules/structure/services/persistence/organizational-unit-financial-settings.ts:setFinancialSettings
12 Workspace authority gates this capabilitypermissionapinegativeproposed
Proves
BR-CAP-MBR-STR-019-01
Preconditions
An isolated workspace contains the records and current versions needed for the case.
Steps
Exercise the capability’s exposed operations with its read-only and management callers, then repeat with application access removed, an unlicensed workspace and an unavailable workspace.
Expected
Each named operation requires its declared authority; admission failures occur before any record or calculated result is exposed.
Data
Separate fixture records for the accepted and refused operations.
Source
services-membership:tests/unit/route-authorization.spec.ts#route authorization: every Membership operation names its permission › requires membership.structure.read of every structure read and membership.structure.manage of every change,services-membership:modules/configuration/aws/api/configuration.routes.ts:configurationModuleRoutes,services-membership:tests/e2e/terms-api.e2e.spec.ts#the terms API, end to end in process › refuses a caller who holds no key in the tenant

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.