mirror of
https://github.com/pretix/pretix.git
synced 2026-05-03 14:54:04 +00:00
Payment term in minutes (#1760)
Co-authored-by: Raphael Michel <michel@rami.io>
This commit is contained in:
@@ -78,6 +78,20 @@ def test_expiry_weekdays(event):
|
||||
assert order.expires.weekday() == 0
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_expiry_minutes(event):
|
||||
today = now()
|
||||
event.settings.set('payment_term_days', 5)
|
||||
event.settings.set('payment_term_mode', 'minutes')
|
||||
event.settings.set('payment_term_minutes', 30)
|
||||
event.settings.set('payment_term_weekdays', False)
|
||||
order = _create_order(event, email='dummy@example.org', positions=[],
|
||||
now_dt=today, payment_provider=FreeOrderProvider(event),
|
||||
locale='de')[0]
|
||||
assert (order.expires - today).days == 0
|
||||
assert (order.expires - today).seconds == 30 * 60
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_expiry_last(event):
|
||||
today = now()
|
||||
|
||||
Reference in New Issue
Block a user