Skip to content

Commit

Permalink
[IMP] fieldservice_recurring: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brian10048 committed Nov 13, 2023
1 parent 22f86df commit 393cfc4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions fieldservice_recurring/tests/test_fsm_recurring.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ def setUpClass(cls):
)
cls.test_equipment = cls.Equipment.create({"name": "Equipment"})

def test_fsm_recurring_change_states(self):
recurring = self.Recurring.create(
{
"fsm_frequency_set_id": self.fr_set.id,
"location_id": self.test_location.id,
"start_date": fields.Datetime.now().replace(hour=12),
}
)
recurring.action_start()
self.assertEqual(recurring.state, "progress")
recurring.action_suspend()
self.assertEqual(recurring.state, "suspend")

def test_cron_generate_orders_rule1(self):
"""Test recurring order with following rule,
- Work order Monday to Friday, exclude odd week Wednesday
Expand Down

0 comments on commit 393cfc4

Please sign in to comment.