Skip to content

Commit

Permalink
Add test for unsetting schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
mureytasroc committed Oct 26, 2023
1 parent b164f9f commit f646009
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions backend/tests/plan/test_primary_schedules.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ def test_replace_primary_schedule(self):
response = self.client.post(primary_schedule_url, {"schedule_id": self.s2.id})
self.assertEqual(response.status_code, 200)
self.assert_primary_schedule_id(self.client, self.u1, self.s2.id, num_primary=1)

def test_unset_primary_schedule(self):
response = self.client.post(primary_schedule_url, {"schedule_id": self.s.id})
self.assertEqual(response.status_code, 200)
self.assert_primary_schedule_id(self.client, self.u1, self.s.id, num_primary=1)

response = self.client.post(primary_schedule_url, {"schedule_id": None})
self.assertEqual(response.status_code, 200)
self.assert_primary_schedule_id(self.client, self.u1, None, num_primary=0)

def test_primary_schedule_friends(self):
response = self.client.post(primary_schedule_url, {"schedule_id": self.s.id})
Expand Down

0 comments on commit f646009

Please sign in to comment.