summaryrefslogtreecommitdiff
path: root/test/test_templates.py
diff options
context:
space:
mode:
authorMarkus Krogh <markus@nordu.net>2016-03-10 11:53:42 +0000
committerMarkus Krogh <markus@nordu.net>2016-03-10 11:53:42 +0000
commit4575c7ea47680e7f589477c917a73353d6faef73 (patch)
tree5f1fb1d8d120b8d609b2018a5eb8e8ad30183952 /test/test_templates.py
parent67abade3147d6d706c18beaac219d549fb71c35e (diff)
Manager mail + ceo mail
Diffstat (limited to 'test/test_templates.py')
-rw-r--r--test/test_templates.py61
1 files changed, 0 insertions, 61 deletions
diff --git a/test/test_templates.py b/test/test_templates.py
deleted file mode 100644
index ee05ac6..0000000
--- a/test/test_templates.py
+++ /dev/null
@@ -1,61 +0,0 @@
-from maconomy import UnsubmittedEmailTemplate, MissingEmailTemplate, ManagerEmailTemplate, Employee
-import unittest
-
-class UnsubmittedEmailTemplateTest(unittest.TestCase):
-
- def setUp(self):
- self.template = UnsubmittedEmailTemplate()
-
- def test_substitution(self):
- result = self.template.build(week=10, maconomyurl="http://localhost/", helpurl="http://example.com")
- self.assertIn("week 10", result)
- self.assertIn("href=\"http://localhost/\"", result)
- self.assertIn("href=\"http://example.com\"", result)
-
-class MissingEmailTemplateTest(unittest.TestCase):
-
- def setUp(self):
- self.template = MissingEmailTemplate()
-
- def test_substitution(self):
- result = self.template.build(maconomyurl="http://localhost/", helpurl="http://example.com")
- self.assertIn("href=\"http://localhost/\"", result)
- self.assertIn("href=\"http://example.com\"", result)
-
-class ManagerEmailTemplateTest(unittest.TestCase):
-
- def setUp(self):
- self.template = ManagerEmailTemplate()
- self.employee = Employee(("MK", "Markus Krogh", "markus@nordu.net"))
-
- def test_substitute(self):
- result = self.template.build(
- employee=self.employee,
- week=11,
- maconomyurl="http://localhost/",
- )
- self.assertIn("Markus Krogh (MK)", result)
- self.assertIn("Week 11", result)
- self.assertIn("not been submitted", result)
- self.assertIn("not been approved", result)
- self.assertIn("href=\"http://localhost/\"", result)
-
- def test_submitted(self):
- result = self.template.build(
- employee=self.employee,
- week=11,
- maconomyurl="http://localhost/",
- submitted = True,
- )
- self.assertIn("has been submitted", result)
- def test_approved(self):
- result = self.template.build(
- employee=self.employee,
- week=11,
- maconomyurl="http://localhost/",
- approved = True,
- )
- self.assertIn("has been approved", result)
-
-
-