mirror of
https://github.com/pretix/pretix.git
synced 2026-05-03 14:54:04 +00:00
Do not send download reminders if order is placed after download date
This commit is contained in:
@@ -434,7 +434,7 @@ class DownloadReminderTests(TestCase):
|
||||
self.order = Order.objects.create(
|
||||
code='FOO', event=self.event, email='dummy@dummy.test',
|
||||
status=Order.STATUS_PAID, locale='en',
|
||||
datetime=now() - timedelta(hours=4),
|
||||
datetime=now() - timedelta(days=4),
|
||||
expires=now() - timedelta(hours=4) + timedelta(days=10),
|
||||
total=Decimal('46.00'),
|
||||
)
|
||||
@@ -533,6 +533,14 @@ class DownloadReminderTests(TestCase):
|
||||
send_download_reminders(sender=self.event)
|
||||
assert len(djmail.outbox) == 0
|
||||
|
||||
@classscope(attr='o')
|
||||
def test_not_sent_after_reminder_date(self):
|
||||
self.order.datetime = self.event.date_from - timedelta(days=1)
|
||||
self.order.save()
|
||||
self.event.settings.mail_days_download_reminder = 2
|
||||
send_download_reminders(sender=self.event)
|
||||
assert len(djmail.outbox) == 0
|
||||
|
||||
|
||||
class OrderCancelTests(TestCase):
|
||||
def setUp(self):
|
||||
|
||||
Reference in New Issue
Block a user