Self hosted FLOSS fitness/workout, nutrition and weight tracker
Add test for mobile views getting used
Scott Peshakcc78a43b745a
diff --git a/wger/core/tests/test_index.py b/wger/core/tests/test_index.pyindex 4052dea90..af5b17e9f 100644--- a/wger/core/tests/test_index.py+++ b/wger/core/tests/test_index.py@@ -96,3 +96,16 @@ class DashboardTestCase(WorkoutManagerTestCase):self.user_login('admin')self.dashboard()++ def test_mobile_dashboard(self):+ '''+ Test that a mobile request gets the mobile view+ '''+ response = self.client.get(reverse('core:dashboard'))++ self.assertEqual(response.status_code, 200)++ if self.is_mobile:+ self.assertContains(response, 'css/workout-manager-mobile.css', html=False)+ else:+ self.assertContains(response, 'css/workout-manager.css', html=False)