From 06dbf234e2b6f34fcfb7cac64e8965249d4978f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 16 May 2021 17:47:59 +0200 Subject: [PATCH] Test recalling too much deposit issue10399 review348381002 --- tests/scenario_deposit.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/scenario_deposit.rst b/tests/scenario_deposit.rst index d2f7f01cd6..303e3ab2ae 100644 --- a/tests/scenario_deposit.rst +++ b/tests/scenario_deposit.rst @@ -94,3 +94,18 @@ Recall deposit:: Decimal('-100.00') >>> invoice.untaxed_amount Decimal('400.00') + +Recall too much:: + + >>> deposit_line.unit_price = Decimal('-200.00') + >>> deposit_line.save() + >>> invoice.click('post') # doctest: +IGNORE_EXCEPTION_DETAIL + Traceback (most recent call last): + ... + DepositError: ... + +Recall available:: + + >>> deposit_line.unit_price = Decimal('-100.00') + >>> deposit_line.save() + >>> invoice.click('post')