diff options
author | Markus Krogh <markus@nordu.net> | 2016-03-15 12:37:16 +0000 |
---|---|---|
committer | Markus Krogh <markus@nordu.net> | 2016-03-15 12:37:16 +0000 |
commit | 2d953d27d0d1aad7491485c739a9507127354af9 (patch) | |
tree | a5a47c5d0ed8e3295e3babcb2f25267ff2892dc1 /test/templates/test_employee_status_template.py | |
parent | c9d7afac4f1396b6e632277b39fea816b974131e (diff) |
Update manager mails and ceo mail
Diffstat (limited to 'test/templates/test_employee_status_template.py')
-rw-r--r-- | test/templates/test_employee_status_template.py | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/test/templates/test_employee_status_template.py b/test/templates/test_employee_status_template.py index 0d37d3e..9869b81 100644 --- a/test/templates/test_employee_status_template.py +++ b/test/templates/test_employee_status_template.py @@ -1,25 +1,23 @@ -from maconomy import EmployeeStatusTemplate, Employee, Timesheet +from maconomy import EmployeeStatusListTemplate, Employee, Timesheet import unittest -class EmployeeStatusTemplateTest(unittest.TestCase): +class EmployeeStatusListTemplateTest(unittest.TestCase): def setUp(self): - self.template = EmployeeStatusTemplate() + self.template = EmployeeStatusListTemplate() self.employee = Employee.from_result(("MK", "Markus Krogh", "markus@nordu.net")) def test_substitute(self): - timesheet = Timesheet("11", 0, 0, self.employee, "JK") - result = self.template.build(timesheet) - self.assertIn("Markus Krogh (MK)", result) - self.assertIn("not been submitted", result) - self.assertIn("not been approved", result) + timesheets = [Timesheet("11", 0, 0, self.employee, "JK")] + result = self.template.build(timesheets) + self.assertIn("[Unsubmitted] Markus Krogh (MK)", result) def test_submitted(self): - timesheet = Timesheet("11", submitted=1, approved=0, employee=self.employee, approver="JK") - result = self.template.build(timesheet) - self.assertIn("has been submitted", result) + timesheets = [Timesheet("11", submitted=1, approved=0, employee=self.employee, approver="JK")] + result = self.template.build(timesheets) + self.assertIn("[Not approved] Markus Krogh (MK)", result) def test_approved(self): - timesheet = Timesheet("11", submitted=1, approved=1, employee=self.employee, approver="JK") - result = self.template.build(timesheet) - self.assertIn("has been approved", result) + timesheets = [Timesheet("11", submitted=1, approved=1, employee=self.employee, approver="JK")] + result = self.template.build(timesheets) + self.assertIn("[OK] Markus Krogh (MK)", result) |