cr-connect-workflow/tests/test_get_dashboard_url_scri...

18 lines
608 B
Python
Raw Normal View History

from tests.base_test import BaseTest
from crc import app, mail
class TestGetDashboardURL(BaseTest):
def test_get_dashboard_url(self):
with mail.record_messages() as outbox:
2021-05-06 19:54:39 +00:00
dashboard_url = f'https://{app.config["FRONTEND"]}'
workflow = self.create_workflow('email_dashboard_url')
self.get_workflow_api(workflow)
self.assertEqual(1, len(outbox))
self.assertEqual('My Email Subject', outbox[0].subject)
self.assertEqual(['test@example.com'], outbox[0].recipients)
self.assertIn(dashboard_url, outbox[0].body)