feat: Show Cookbooks from Other Households (#4452)

This commit is contained in:
Michael Genson
2024-11-05 13:57:30 -06:00
committed by GitHub
parent 8983745106
commit 87f4b23711
13 changed files with 264 additions and 55 deletions

View File

@@ -299,3 +299,16 @@ def test_cookbook_recipes_includes_all_households(api_client: TestClient, unique
assert recipe.id in fetched_recipe_ids
for recipe in other_recipes:
assert recipe.id in fetched_recipe_ids
def test_cookbooks_from_other_households(api_client: TestClient, unique_user: TestUser, h2_user: TestUser):
h2_cookbook = h2_user.repos.cookbooks.create(
SaveCookBook(
name=random_string(),
group_id=h2_user.group_id,
household_id=h2_user.household_id,
)
)
response = api_client.get(api_routes.recipes, params={"cookbook": h2_cookbook.slug}, headers=unique_user.token)
assert response.status_code == 200