1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-02 20:15:24 +02:00

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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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