fix: Update favorite endpoint path from /favorite to /toggle-favorite

The actual API endpoint is /toggle-favorite, not /favorite. Update all
test cases to use the correct endpoint path.
This commit is contained in:
Tanya 2026-01-09 12:52:51 -05:00
parent 4f21998915
commit 79d20ecce8

View File

@ -230,7 +230,7 @@ class TestPhotoFavorites:
):
"""Verify adding favorite."""
response = test_client.post(
f"/api/v1/photos/{test_photo.id}/favorite",
f"/api/v1/photos/{test_photo.id}/toggle-favorite",
headers=auth_headers,
)
@ -264,7 +264,7 @@ class TestPhotoFavorites:
# Remove it
response = test_client.post(
f"/api/v1/photos/{test_photo.id}/favorite",
f"/api/v1/photos/{test_photo.id}/toggle-favorite",
headers=auth_headers,
)
@ -279,7 +279,7 @@ class TestPhotoFavorites:
):
"""Verify 401 without auth."""
response = test_client.post(
f"/api/v1/photos/{test_photo.id}/favorite",
f"/api/v1/photos/{test_photo.id}/toggle-favorite",
)
assert response.status_code == 401
@ -291,7 +291,7 @@ class TestPhotoFavorites:
):
"""Verify 404 for non-existent photo."""
response = test_client.post(
"/api/v1/photos/99999/favorite",
"/api/v1/photos/99999/toggle-favorite",
headers=auth_headers,
)