Bug 33176: Enforce bad values
authorLucas Gass <lucas@bywatersolutions.com>
Wed, 7 Jun 2023 18:40:48 +0000 (18:40 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 12 Jun 2023 14:52:07 +0000 (11:52 -0300)
commit676d263687ad666184fce6d505af6d9672412732
tree0330fd1feca5704bf02dc0cd9692872a08add9cf
parentdf4285adb2f6669ad62b0e3b1eddb04f44761d16
Bug 33176: Enforce bad values

1. Turn on RequirePaymentType
2. Create a manual invocie on a patron account
3. Go to pay it, 'Payment type:' is marked as required.
4. In the inscept the select input ( #payment_type ) with your browser's dev tools. Removed the required attribute.
5. You are able to make the payment without a payment type.
6. Apply patch and restart_all
7. Try 4-5 again. This time you should get a 500 error and the payment should not go through.
8. Try a paymnet again this time manipulate the DOM and change the value of 'CASH' to something else like 'SOMETHINGELSE'.
9. Try to submit the payment and again you will get a 500 error. The payment should not go through.
10. Turn RequirePaymentType off. Try a payment with a payment type, you shoud be successful.
11. Make sure tests will pass

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Account.pm
Koha/Exceptions/Account.pm
t/db_dependent/Koha/Account.t