ATS-MBR-MEM-020Tell other applications when membership changes: Acceptance Test Set
MarkdownTell other applications when membership changes: Acceptance Test Set
Coverage
Test Scenarios
7 scenarios proving CAP-MBR-MEM-020; 7 bound to an existing test.
01 Each operation states exactly its events, and a rollback states noneapitest
- Proves
BR-CAP-MBR-MEM-020-01 - Preconditions
- The well-known FAA workspace fixtures, or a workspace the test builds from them.
- Steps
- Run each staff, affiliation, structure and sweep operation; roll one back; state an event outside a transaction.
- Expected
- Exactly the expected events with their contents; none for the rollback; the last refused.
- Data
- FAA programs, packages, units and members from the integration seed.
- Bound to
- Source
- services-membership:modules/events/tests/integration/business-events.integration.spec.ts#states membership.term.committed and the term’s affiliation for a staff creation, naming the person, the program and the term
02 Events name the membership's holder correctlyunittest
- Proves
BR-CAP-MBR-MEM-020-02 - Preconditions
- The well-known FAA workspace fixtures, or a workspace the test builds from them.
- Steps
- Build events for a person's and an organization's membership.
- Expected
- The person by contact; the organization by organization with no contact.
- Data
- FAA programs, packages, units and members from the integration seed.
- Bound to
- Source
- services-membership:modules/memberships/tests/unit/membership-business-events.spec.ts#names a person’s membership by its contact_id and no organization
03 Terminations and lapses carry the last day of rightsapitest
- Proves
BR-CAP-MBR-MEM-020-03 - Preconditions
- The well-known FAA workspace fixtures, or a workspace the test builds from them.
- Steps
- Terminate a term and let the sweep find another lapsed.
- Expected
- Each is one termination with its last day, the first day without and the reason; the lapse ends on the term's own last day.
- Data
- FAA programs, packages, units and members from the integration seed.
- Bound to
- Source
- services-membership:modules/events/tests/integration/business-events.integration.spec.ts#states one membership.term.terminated for a staff termination, with the person’s contact_id and the last day of rights
04 A cancellation says whether the membership went with itapitest
- Proves
BR-CAP-MBR-MEM-020-04 - Preconditions
- The well-known FAA workspace fixtures, or a workspace the test builds from them.
- Steps
- Cancel a pending first purchase and a pending renewal.
- Expected
- The first says the membership was removed; the second does not.
- Data
- FAA programs, packages, units and members from the integration seed.
- Bound to
- Source
- services-membership:modules/memberships/tests/unit/membership-business-events.spec.ts#says whether a cancellation removed the membership
05 Event contents are strictunitnegativetest
- Proves
BR-CAP-MBR-MEM-020-05 - Preconditions
- The well-known FAA workspace fixtures, or a workspace the test builds from them.
- Steps
- Validate a termination without its last day, an undeclared field, a non-local date and an overlong id.
- Expected
- Each is refused.
- Data
- FAA programs, packages, units and members from the integration seed.
- Bound to
- Source
- services-membership:modules/events/tests/unit/business-event-schemas.spec.ts#refuses a termination that names no last day
06 Committees receives terminations alone, each with a stable identifierapitest
- Proves
BR-CAP-MBR-MEM-020-06 - Preconditions
- The well-known FAA workspace fixtures, or a workspace the test builds from them.
- Steps
- Dispatch a batch of events to Committees' fake receiver, then redeliver.
- Expected
- Only the termination is handed over, as the remote contract, with the event's own id; the others settle without a call.
- Data
- FAA programs, packages, units and members from the integration seed.
- Bound to
- Source
- services-membership:modules/events/tests/integration/change-events-dispatch.integration.spec.ts#hands Committees the termination alone, as { version: 1, stream, events } with data.contact_id and data.ends_on
07 A failed delivery is retried, then set asideapinegativetest
- Proves
BR-CAP-MBR-MEM-020-07 - Preconditions
- The well-known FAA workspace fixtures, or a workspace the test builds from them.
- Steps
- Committees answers failed, then succeeds; on another message it fails on the last attempt.
- Expected
- The first is retried and acknowledged; the second goes to the dead-letter queue.
- Data
- FAA programs, packages, units and members from the integration seed.
- Bound to
- Source
- services-membership:modules/events/tests/integration/change-events-dispatch.integration.spec.ts#returns the message to the queue when Committees answers failed, so SQS retries it