Self hosted FLOSS fitness/workout, nutrition and weight tracker
Add test for unshared calendars
Roland Geider024da57667d2
diff --git a/wger/manager/tests/test_weight_log.py b/wger/manager/tests/test_weight_log.pyindex 9fbb65398..1d59689e9 100644--- a/wger/manager/tests/test_weight_log.py+++ b/wger/manager/tests/test_weight_log.py@@ -99,6 +99,24 @@ class CalendarAccessTestCase(WorkoutManagerTestCase):response = self.client.get(url)self.assertEqual(response.status_code, 200)+ def test_access_not_shared(self):+ '''+ Test accessing the URL of a unshared calendar page+ '''+ url = reverse('manager:workout:calendar', kwargs={'uidb64': make_uid(2)})++ self.user_login('admin')+ response = self.client.get(url)+ self.assertEqual(response.status_code, 403)++ self.user_login('test')+ response = self.client.get(url)+ self.assertEqual(response.status_code, 200)++ self.user_logout()+ response = self.client.get(url)+ self.assertEqual(response.status_code, 403)+class WeightLogOverviewAddTestCase(WorkoutManagerTestCase):'''