mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Mail signature (#485)
* added signature field -- no function yet * added mail signature feature * fixed style issue * fixed problem with signature default * added unit test for mail signatures * added unit test for mail signatures
This commit is contained in:
@@ -48,6 +48,18 @@ def test_send_mail_with_event_sender(env):
|
||||
assert djmail.outbox[0].from_email == 'foo@bar'
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_send_mail_with_event_signature(env):
|
||||
djmail.outbox = []
|
||||
event, user, organizer = env
|
||||
event.settings.set('mail_text_signature', 'This is a test signature.')
|
||||
mail('dummy@dummy.dummy', 'Test subject', 'mailtest.txt', {}, event)
|
||||
|
||||
assert len(djmail.outbox) == 1
|
||||
assert djmail.outbox[0].to == [user.email]
|
||||
assert 'This is a test signature.' in djmail.outbox[0].body
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_send_mail_with_default_sender(env):
|
||||
djmail.outbox = []
|
||||
|
||||
Reference in New Issue
Block a user