mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-10-27 00:04:23 -04:00
feat: Simplify Default Layout Logic and Add Household.name To Cookbooks API (#6243)
This commit is contained in:
@@ -139,6 +139,7 @@ def test_get_one_cookbook(
|
||||
assert response.status_code == 200
|
||||
cookbook_data = response.json()
|
||||
assert cookbook_data["id"] == str(cookbook.id)
|
||||
assert cookbook_data["household"]["name"] == household.name
|
||||
|
||||
|
||||
def test_get_cookbooks_with_recipes(api_client: TestClient, unique_user: TestUser, h2_user: TestUser):
|
||||
|
||||
@@ -89,6 +89,9 @@ def test_read_cookbook(
|
||||
use_other_household: bool,
|
||||
):
|
||||
sample = random.choice(cookbooks)
|
||||
household = unique_user.repos.households.get_one(sample.data["household_id"])
|
||||
assert household
|
||||
|
||||
if use_other_household:
|
||||
headers = h2_user.token
|
||||
else:
|
||||
@@ -104,6 +107,8 @@ def test_read_cookbook(
|
||||
assert page_data["slug"] == sample.slug
|
||||
assert page_data["name"] == sample.name
|
||||
assert page_data["groupId"] == str(unique_user.group_id)
|
||||
assert page_data["householdId"] == str(unique_user.household_id)
|
||||
assert page_data["household"]["name"] == household.name
|
||||
|
||||
|
||||
def test_update_cookbook(api_client: TestClient, unique_user: TestUser, cookbooks: list[TestCookbook]):
|
||||
|
||||
Reference in New Issue
Block a user