adding food logging, phase 6
This commit is contained in:
@@ -118,3 +118,12 @@ class RepeatLoggingTests(TestCase):
|
||||
self.assertContains(response, 'id="food-workspace"')
|
||||
self.assertNotContains(response, '<!doctype html>')
|
||||
self.assertNotIn('HX-Push-Url', response)
|
||||
|
||||
def test_add_and_edit_use_settings_switches(self):
|
||||
add = self.client.get(reverse('food:add'), {'product': self.product.pk})
|
||||
self.assertContains(add, 'settings-switch__track', count=2)
|
||||
entry = FoodLogEntry.objects.create(user=self.user, date=date(2026, 10, 3),
|
||||
meal=MealType.BREAKFAST, product=self.product, product_name_snapshot='Greek yoghurt',
|
||||
amount=100, unit=Unit.GRAM)
|
||||
edit = self.client.get(reverse('food:edit', args=[entry.pk]))
|
||||
self.assertContains(edit, 'settings-switch__track', count=2)
|
||||
|
||||
Reference in New Issue
Block a user