committed by
mergify-bot
parent
70febe468b
commit
d50dbca844
@@ -281,7 +281,7 @@ class TestLeaveApplication(unittest.TestCase):
|
|||||||
first_sunday = get_first_sunday(self.holiday_list)
|
first_sunday = get_first_sunday(self.holiday_list)
|
||||||
>>>>>>> 3f3b1766c2 (test: get leave details for leave application dashboard)
|
>>>>>>> 3f3b1766c2 (test: get leave details for leave application dashboard)
|
||||||
|
|
||||||
leave_application = make_leave_application(employee.name, add_days(first_sunday, 1), add_days(first_sunday, 4), leave_type.name)
|
leave_application = make_leave_application(employee.name, first_sunday, add_days(first_sunday, 3), leave_type.name)
|
||||||
leave_application.reload()
|
leave_application.reload()
|
||||||
self.assertEqual(leave_application.total_leave_days, 4)
|
self.assertEqual(leave_application.total_leave_days, 4)
|
||||||
self.assertEqual(frappe.db.count('Attendance', {'leave_application': leave_application.name}), 4)
|
self.assertEqual(frappe.db.count('Attendance', {'leave_application': leave_application.name}), 4)
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class TestEmployeeLeaveBalance(unittest.TestCase):
|
|||||||
leave_application2.reload()
|
leave_application2.reload()
|
||||||
|
|
||||||
filters = frappe._dict({
|
filters = frappe._dict({
|
||||||
'date': self.date,
|
'date': add_days(leave_application2.to_date, 1),
|
||||||
'company': '_Test Company',
|
'company': '_Test Company',
|
||||||
'employee': self.employee_id
|
'employee': self.employee_id
|
||||||
})
|
})
|
||||||
@@ -100,7 +100,7 @@ class TestEmployeeLeaveBalance(unittest.TestCase):
|
|||||||
|
|
||||||
# Leave balance should show actual balance, and not "consumption balance as per remaining days", near alloc end date
|
# Leave balance should show actual balance, and not "consumption balance as per remaining days", near alloc end date
|
||||||
# eg: 3 days left for alloc to end, leave balance should still be 26 and not 3
|
# eg: 3 days left for alloc to end, leave balance should still be 26 and not 3
|
||||||
frappe._dict({
|
filters = frappe._dict({
|
||||||
'date': add_days(self.year_end, -3),
|
'date': add_days(self.year_end, -3),
|
||||||
'company': '_Test Company',
|
'company': '_Test Company',
|
||||||
'employee': self.employee_id
|
'employee': self.employee_id
|
||||||
|
|||||||
Reference in New Issue
Block a user