mirror of
https://github.com/pretix/pretix.git
synced 2026-05-17 17:14:04 +00:00
Disable email rules if event is not live (#3181)
This commit is contained in:
@@ -368,6 +368,20 @@ def test_sendmail_rule_only_send_once(event, order):
|
||||
assert len(djmail.outbox) == 1
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@scopes_disabled()
|
||||
def test_sendmail_rule_only_live(event, order):
|
||||
djmail.outbox = []
|
||||
event.live = False
|
||||
event.save()
|
||||
|
||||
event.sendmail_rules.create(send_date=dt_now - datetime.timedelta(hours=1), include_pending=True,
|
||||
subject='meow', template='meow meow meow')
|
||||
|
||||
sendmail_run_rules(None)
|
||||
assert len(djmail.outbox) == 0
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@scopes_disabled()
|
||||
def test_sendmail_rule_disabled(event, order):
|
||||
|
||||
Reference in New Issue
Block a user