diff --git a/tests/data/email_script/email_script.bpmn b/tests/data/email_script/email_script.bpmn new file mode 100644 index 00000000..7719e696 --- /dev/null +++ b/tests/data/email_script/email_script.bpmn @@ -0,0 +1,71 @@ + + + + + Flow_0scd96e + + + + + + + + + + + + + Flow_0scd96e + Flow_0c60gne + + + + Flow_19fqvhc + + + + Dear Person, + + +Thank you for using this email example. +I hope this makes sense. + + +Yours faithfully, + + +Dan + Flow_0c60gne + Flow_19fqvhc + email("My Email Subject", email_address) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/test_email_script.py b/tests/test_email_script.py new file mode 100644 index 00000000..5ec05ca8 --- /dev/null +++ b/tests/test_email_script.py @@ -0,0 +1,20 @@ +from tests.base_test import BaseTest + + +class TestEmailScript(BaseTest): + + def test_email_script(self): + + workflow = self.create_workflow('email_script') + + # Start the workflow. + first_task = self.get_workflow_api(workflow).next_task + # self.assertEqual('Activity_GetData', first_task.name) + workflow = self.get_workflow_api(workflow) + # self.complete_form(workflow, first_task, {'email_address': 'mike@sartography.com'}) + # self.complete_form(workflow, first_task, {'email_address': 'kcm4zc'}, user_uid='kcm4zc') + result = self.complete_form(workflow, first_task, {'email_address': "'kcm4zc'"}) + print(result) + task = self.get_workflow_api(workflow).next_task + self.assertEqual(task.name, 'string') + # self.assertEqual('Activity_HowMany', workflow.next_task.name)