Bug 26355: (QA follow-up) Strip self_renewal_available in EmailPatronRegistrations tests

to_api now returns the derived self_renewal_available field, so
reusing a to_api'd patron as the POST body for /api/v1/patrons fails
with 500 (the value has no matching DB column). Adjacent subtests
already delete this read-only field before POSTing; do the same in
the EmailPatronRegistrations subtest.

Test plan:
1. prove t/db_dependent/api/v1/patrons.t — all tests pass.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Martin Renvoize 2026-04-21 16:12:10 +01:00 committed by Lucas Gass
parent e625b68bc1
commit 9487953932
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 1 additions and 0 deletions

View File

@ -648,6 +648,7 @@ subtest 'add() tests' => sub {
delete $newpatron->{restricted};
delete $newpatron->{expired};
delete $newpatron->{anonymized};
delete $newpatron->{self_renewal_available};
$patron_to_delete->delete;
# Set a date field