summaryrefslogtreecommitdiff
path: root/test/templates/test_ceo_template.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/templates/test_ceo_template.py')
-rw-r--r--test/templates/test_ceo_template.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/templates/test_ceo_template.py b/test/templates/test_ceo_template.py
new file mode 100644
index 0000000..6962a20
--- /dev/null
+++ b/test/templates/test_ceo_template.py
@@ -0,0 +1,19 @@
+from maconomy import CEOEmailTemplate, Timesheet
+import unittest
+
+class CEOEmailTemplateTest(unittest.TestCase):
+ def setUp(self):
+ self.template = CEOEmailTemplate()
+ self.not_approved = Timesheet.from_result(("MK", "Markus Krogh", "markus@nordu.net", "11", 1, 0, "JK"))
+ self.not_submitted = Timesheet.from_result(("MKR", "Markus Krogh", "markusk@nordu.net", "11", 0, 0, "JKL"))
+
+ def test_ceo_email(self):
+ result = self.template.build(timesheets=[self.not_approved, self.not_submitted])
+
+ self.assertIn("Markus Krogh (MKR)", result)
+ self.assertIn("Markus Krogh (MK)", result)
+ self.assertIn("has not been approved by JK", result)
+ self.assertIn("has not been approved by JKL", result)
+ self.assertIn("has been submitted", result)
+ self.assertIn("has not been submitted", result)
+