Skip to content

ATS-ACC-BAT-006Remove an unused batch safely: Capability Test Specification

Markdown

ATS-ACC-BAT-006

Remove an unused batch safely: Capability Test Specification

Markdown
  • DocumentProposed
  • Product intentProposed

KindAcceptance test setProduct areaAccountingModuleBatch ManagementRevision2

Read atservices-accounting f47cb263react-console baf6dae3rhythm-v2-docs 37405d50

Coverage

  • Rule covered
  • Transition gap: FND-ACC-BAT-060
  • Validation gap: FND-ACC-BAT-060
  • Permission gap: FND-ACC-BAT-060
  • Edge covered
  • Failure covered
  • Boundary gap: FND-ACC-BAT-060
  • Concurrency gap: FND-ACC-BAT-060
  • Invariant covered
  • Interaction covered

Test Scenarios

10 scenarios proving CAP-ACC-BAT-006; 4 bound to an existing test.

01 Deletion needs its own permissionpermissionapinegativeproposed
Proves
BR-CAP-ACC-BAT-006-01
Preconditions
An empty Open batch is visible to a caller with read and update access only.
Steps
Request deletion as that caller.
Expected
The request returns 403 and preserves the record.
Data
Provide a principal without accounting.batches.delete.
Source
services-accounting:modules/batches/aws/api/batch-records.routes.ts:deleteBatch
02 Only eligible empty batches disappeartransitionapinegativetest
Proves
BR-CAP-ACC-BAT-006-02 BR-CAP-ACC-BAT-006-07
Preconditions
An empty Open batch and a Posted batch exist.
Steps
Delete each batch.
Expected
The empty record subsequently returns 404; the Posted record returns 409.
Data
Provide a posted batch.
Bound to
Source
services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#refuses deleting a posted batch
03 References explain deletion refusalfailureapinegativetest
Proves
BR-CAP-ACC-BAT-006-03 INV-DOM-ACC-BAT-001-06
Preconditions
Separate Open batches are referenced by an invoice, payment, credit or posting.
Steps
Delete each referenced batch.
Expected
Each 409 names the batch and the referencing record kind rather than producing a server failure.
Data
Provide one document of each kind.
Bound to
Source
services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#answers 409 naming the batch for every table whose restrict foreign key names a batch, never a 500 (DEF-ACT-0012)
04 Delete locks preserve the batchruleapinegativeproposed
Proves
BR-CAP-ACC-BAT-006-04
Preconditions
An empty batch carries a deletion lock.
Steps
Request deletion.
Expected
A locked-record conflict returns 409.
Data
Provide no fixtures beyond the stated setup.
Source
services-accounting:modules/batches/services/persistence/batches.ts:deleteBatch
05 System records cannot be deleted manuallyedgeapinegativetest
Proves
BR-CAP-ACC-BAT-006-05
Preconditions
The selected batch is deferred revenue.
Steps
Request ordinary deletion.
Expected
A system-batch 409 preserves the record.
Data
Provide a fiscal close's system batch.
Bound to
Source
services-accounting:modules/batches/tests/e2e/system-batches.e2e.spec.js#refuses DELETE 409 system_batch, the batch still there
06 Removing the current batch clears its recurring pointerinteractionapitest
Proves
BR-CAP-ACC-BAT-006-06
Preconditions
A recurring configuration points to an empty active batch.
Steps
Delete that batch and reread the configuration.
Expected
Deletion succeeds and the configuration has no active-batch reference.
Data
Provide a recurring batch.
Bound to
Source
services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#deletes the batch a recurring batch names as its active batch and clears the reference (DEF-ACT-0012)
07 Deletion resolves posting attentioninteractionapiproposed
Proves
BR-CAP-ACC-BAT-006-07 BR-CAP-ACC-BAT-008-04
Preconditions
Attention publication is enabled for an unused Closed batch.
Steps
Delete the batch and inspect its formerly open attention item.
Expected
The batch is absent and its waiting item is resolved.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#deletes an empty batch with its automatic close’s schedule; services-accounting:modules/batches/tests/integration/services/persistence/batch-attention-items.integration.spec.js#resolves a reopened batch reopened, and its next close opens the second generation
08 Deleting unused intake clears the streaminteractionapiproposed
Proves
BR-CAP-ACC-BAT-006-06 BR-CAP-ACC-BAT-009-06
Preconditions
A stream points to an unused Open batch.
Steps
Delete the batch, read the stream and deliver its next roll.
Expected
The first read has no active reference; the roll supplies a new Open intake batch.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#deletes the batch a recurring batch names as its active batch and clears the reference (DEF-ACT-0012); services-accounting:modules/batches/tests/integration/services/roll/batch-roller.integration.spec.js#saves a recurring batch whose first batch is refused, with the refusal and no batch
09 Posting prevents ordinary deletioninteractionapinegativeproposed
Proves
BR-CAP-ACC-BAT-006-02 BR-CAP-ACC-BAT-013-03
Preconditions
Morning contains one eligible invoice.
Steps
Post Morning, then attempt deletion and reread its posting and entry.
Expected
Deletion returns 409 and the Posted batch and its current entry remain.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#refuses deleting a posted batch; services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#posts a batch as a durable job: the answer is the job, and the job posts the batch
10 Unused removal clears scheduling and attentioninvariantapiproposed
Proves
BR-CAP-ACC-BAT-006-07
Preconditions
Attention is enabled for an unused Closed batch whose setup records its former close schedule.
Steps
Delete the batch and inspect the schedule and the outstanding attention item.
Expected
The collection and any owned close schedule are absent and its open attention item is resolved.
Data
Owned records in an isolated workspace with the stated calendar and accounting setup.
Source
services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#deletes an empty batch with its automatic close’s schedule

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.