Skip to content

Commit

Permalink
Merge PR #113 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Mar 17, 2024
2 parents 59b98f5 + 64afdd9 commit 59a2756
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from datetime import timedelta

from freezegun import freeze_time

from odoo import fields
from odoo.tests import Form, TransactionCase


@freeze_time("2024-01-01")
class TestHrLeaveCalendarEvent(TransactionCase):
@classmethod
def setUpClass(cls):
Expand All @@ -24,15 +27,15 @@ def _new_leave_request(cls, date_from, date_to):
def test_calendar_event_privacy(self):
self.assertEqual(self.leave_type.calendar_event_privacy, "confidential")
leave = self._new_leave_request(
fields.Date.today() + timedelta(days=12),
fields.Date.today() + timedelta(days=13),
fields.Date.today() + timedelta(days=2),
fields.Date.today() + timedelta(days=3),
)
leave.action_validate()
self.assertEqual(leave.meeting_id.privacy, "confidential")
self.leave_type.calendar_event_privacy = "public"
leave = self._new_leave_request(
fields.Date.today() + timedelta(days=13),
fields.Date.today() + timedelta(days=14),
fields.Date.today() + timedelta(days=3),
fields.Date.today() + timedelta(days=4),
)
leave.action_validate()
self.assertEqual(leave.meeting_id.privacy, "public")

0 comments on commit 59a2756

Please sign in to comment.